]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Resurrect ring kicking for semaphores, selectively
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 14 Mar 2013 15:52:05 +0000 (17:52 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 17 Mar 2013 21:52:51 +0000 (22:52 +0100)
commitccd30ed82233bc6de6638d6b185cc0dc87680acb
tree2ec3748ba69802d163c1d3071c318c24e8b65886
parentec773c1c5e955df0bef63f3920636570ecb6d85c
drm/i915: Resurrect ring kicking for semaphores, selectively

Once we thought we got semaphores working, we disabled kicking the ring
if hangcheck fired whilst waiting upon a ring as it was doing more harm
than good:

commit 362276ec8da73d4db57385bdd6545beac65a7b22
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Wed Dec 14 13:56:58 2011 +0100

    drm/i915: kicking rings stuck on semaphores considered harmful

However, life is never that easy and semaphores are still causing
problems whereby the value written by one ring (bcs) is not being
propagated to the waiter (rcs). Thus the waiter never wakes up and we
declare the GPU hung, which often has unfortunate consequences, even if
we successfully reset the GPU.

But the GPU is idle as it has completed the work, just didn't notify its
clients. So we can detect the incomplete wait during hang check and
probe the target ring to see if has indeed emitted the breadcrumb seqno
following the work and then and only then kick the waiter.

Based on a suggestion by Ben Widawsky.

v2: cross-check wait with iphdr. fix signaller calculation.

References: https://bugs.freedesktop.org/show_bug.cgi?id=54226
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Ben Widawsky <ben@bwidawsk.net>
Acked-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_irq.c