diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-08 19:02:03 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-09 04:18:00 -0400 |
commit | 7839d956fc6aecbb66d645b4050e8e88e2e821cd (patch) | |
tree | 43e60ca6f0b1cb9abdb65e573da2711d1fe3c406 /drivers/gpu | |
parent | c3add4b63438555d5e88c5893d238ab80d1f5959 (diff) |
drm/i915: Double check that the wait_request is not pending before warning
If we are busy, then we may have woken up the wait_request handler but
not yet serviced it before the hang check fires. So in hang check,
double check that the i915_gem_do_wait_request() is still pending the
wake-up before declaring all hope lost.
Fixes regression with e78d73b16bcde921c9cf458d2e4de8e4fc2518f3.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=30073
Reported-and-tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/i915_irq.c | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index 59457e83b011..744225ebb4b2 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c | |||
@@ -1350,17 +1350,25 @@ void i915_hangcheck_elapsed(unsigned long data) | |||
1350 | i915_seqno_passed(i915_get_gem_seqno(dev, | 1350 | i915_seqno_passed(i915_get_gem_seqno(dev, |
1351 | &dev_priv->render_ring), | 1351 | &dev_priv->render_ring), |
1352 | i915_get_tail_request(dev)->seqno)) { | 1352 | i915_get_tail_request(dev)->seqno)) { |
1353 | bool missed_wakeup = false; | ||
1354 | |||
1353 | dev_priv->hangcheck_count = 0; | 1355 | dev_priv->hangcheck_count = 0; |
1354 | 1356 | ||
1355 | /* Issue a wake-up to catch stuck h/w. */ | 1357 | /* Issue a wake-up to catch stuck h/w. */ |
1356 | if (dev_priv->render_ring.waiting_gem_seqno | | 1358 | if (dev_priv->render_ring.waiting_gem_seqno && |
1357 | dev_priv->bsd_ring.waiting_gem_seqno) { | 1359 | waitqueue_active(&dev_priv->render_ring.irq_queue)) { |
1358 | DRM_ERROR("Hangcheck timer elapsed... GPU idle, missed IRQ.\n"); | 1360 | DRM_WAKEUP(&dev_priv->render_ring.irq_queue); |
1359 | if (dev_priv->render_ring.waiting_gem_seqno) | 1361 | missed_wakeup = true; |
1360 | DRM_WAKEUP(&dev_priv->render_ring.irq_queue); | 1362 | } |
1361 | if (dev_priv->bsd_ring.waiting_gem_seqno) | 1363 | |
1362 | DRM_WAKEUP(&dev_priv->bsd_ring.irq_queue); | 1364 | if (dev_priv->bsd_ring.waiting_gem_seqno && |
1365 | waitqueue_active(&dev_priv->bsd_ring.irq_queue)) { | ||
1366 | DRM_WAKEUP(&dev_priv->bsd_ring.irq_queue); | ||
1367 | missed_wakeup = true; | ||
1363 | } | 1368 | } |
1369 | |||
1370 | if (missed_wakeup) | ||
1371 | DRM_ERROR("Hangcheck timer elapsed... GPU idle, missed IRQ.\n"); | ||
1364 | return; | 1372 | return; |
1365 | } | 1373 | } |
1366 | 1374 | ||