]> bbs.cooldavid.org Git - net-next-2.6.git/commit
drm/i915: Wake-up wait_request() from elapsed hang-check (v2)
authorChris Wilson <chris@chris-wilson.co.uk>
Sat, 7 Aug 2010 13:18:47 +0000 (14:18 +0100)
committerEric Anholt <eric@anholt.net>
Mon, 9 Aug 2010 18:24:36 +0000 (11:24 -0700)
commite78d73b16bcde921c9cf458d2e4de8e4fc2518f3
treece189a9f57f1ef6dc9d3368bd20ac6d566605ad7
parent6eeefaf3c86b8937db8ad930c48bfb592fc5e32e
drm/i915: Wake-up wait_request() from elapsed hang-check (v2)

If our watchdog fires and we see that the GPU is idle, but that we
are still waiting on an interrupt, forcibly wake-up the waiter.

i915_do_wait_request() should not be racy, yet there are persistent
reports that 945GM hangs whilst the GPU is idle. This implies that the
hardware is not quite as coherent as the documentation claims - a write
followed by a flush is supposed to be coherent in main memory before the
flush is retired and the irq is emitted. This seems to be a sensible and
elegant guard to force the wait to timeout.

v2: Daniel Vetter pointed out that a warning would be useful to explain
why the machine appeared to stall.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
drivers/gpu/drm/i915/i915_irq.c