]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/breadcrumbs: Queue hangcheck before sleeping
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 9 Jul 2016 09:12:05 +0000 (10:12 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 14 Jul 2016 13:48:32 +0000 (15:48 +0200)
commit81551d7a089d65a5c4b31e933841095e99a1d4f6
treea1a79f9db83ed171e7a901a155245afe64f68ad5
parentf891d1e96c6ae856b47ccdb7c6d8344f9cfbca0c
drm/i915/breadcrumbs: Queue hangcheck before sleeping

Never go to sleep waiting on the GPU without first ensuring that we will
get woken up.

We have a choice of queuing the hangcheck before every schedule() or the
first time we wakeup. In order to simply accommodate both the signaler
and the ordinary waiter, move the queuing to the common point of
enabling the irq. We lose the paranoid safety of ensuring that the
hangcheck is active before the sleep, but avoid code duplication (and
redundant hangcheck queuing).

Testcase: igt/prime_busy
Fixes: 48e756e74bcb ("drm/i915: Convert trace-irq to the breadcrumb waiter")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1468055535-19740-2-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
(cherry picked from commit 232af392fdb52aa2739dad4e03fed273b3c3f24a)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/intel_breadcrumbs.c