]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Fix __wait_seqno to use true infinite timeouts
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 25 Sep 2013 16:34:55 +0000 (17:34 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 3 Oct 2013 18:01:30 +0000 (20:01 +0200)
commitc13e6d476bb25f4c4d38957cb02c6c33da5bd18f
tree52487590c65d652f6915308746eacad8fb1aceec
parentd08be35ddacd553cd0d37e8a4a05ab37a2094358
drm/i915: Fix __wait_seqno to use true infinite timeouts

When we switched to always using a timeout in conjunction with
wait_seqno, we lost the ability to detect missed interrupts. Since, we
have had issues with interrupts on a number of generations, and they are
required to be delivered in a timely fashion for a smooth UX, it is
important that we do log errors found in the wild and prevent the
display stalling for upwards of 1s every time the seqno interrupt is
missed.

Rather than continue to fix up the timeouts to work around the interface
impedence in wait_event_*(), open code the combination of
wait_event[_interruptible][_timeout], and use the exposed timer to
poll for seqno should we detect a lost interrupt.

v2: In order to satisfy the debug requirement of logging missed
interrupts with the real world requirments of making machines work even
if interrupts are hosed, we revert to polling after detecting a missed
interrupt.

v3: Throw in a debugfs interface to simulate broken hw not reporting
interrupts.

v4: s/EGAIN/EAGAIN/ (Imre)

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Imre Deak <imre.deak@intel.com>
[danvet: Don't use the struct typedef in new code.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_gpu_error.c
drivers/gpu/drm/i915/i915_irq.c