]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use wait_for_atomic_us when waiting for gt fifo
authorMika Kuoppala <mika.kuoppala@linux.intel.com>
Tue, 2 May 2017 14:03:44 +0000 (17:03 +0300)
committerMika Kuoppala <mika.kuoppala@intel.com>
Wed, 3 May 2017 09:47:33 +0000 (12:47 +0300)
commitbbe360411cde02acd7ae7f21b15a4ad491f2b0e4
tree60c3969100fe8741572d4d360d926276329d21cf
parent3f6bb64f27773256d9569cf25b2775baf28c71fa
drm/i915: Use wait_for_atomic_us when waiting for gt fifo

Replace the handcrafter loop when checking for fifo slots
with atomic wait for. This brings this wait in line with
the other waits on register access. We also get a readable
timeout constraint, so make it to fail after 10ms.

Chris suggested that we should fail silently as the fifo debug
handler, now attached to unclaimed mmio handling, will take care of the
possible errors at later stage.

Note that the decision to wait was changed so that we avoid
allocating the first reserved entry. Nor do we reduce the count
if we fail the wait, removing the possiblity to wrap the
count if the hw fifo returned zero.

v2: remove unclaimed check on timeout (Chris)
v3: use void return (Chris)

References: https://bugs.freedesktop.org/show_bug.cgi?id=100247
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/1491493182-31540-1-git-send-email-mika.kuoppala@intel.com
drivers/gpu/drm/i915/intel_uncore.c