drm/i915: Wake-up wait_request() from elapsed hang-check
diff mbox

Message ID 1281182817-7196-1-git-send-email-chris@chris-wilson.co.uk
State Deferred, archived
Headers show

Commit Message

Chris Wilson Aug. 7, 2010, 12:06 p.m. UTC
None

Patch
diff mbox

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 5161cea..3af2ac5 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1304,6 +1304,12 @@  void i915_hangcheck_elapsed(unsigned long data)
 				&dev_priv->render_ring),
 			i915_get_tail_request(dev)->seqno)) {
 		dev_priv->hangcheck_count = 0;
+
+		/* issue a wake-up to catch stuck h/w. */
+		if (dev_priv->render_ring.waiting_gem_seqno)
+			DRM_WAKEUP(&dev_priv->render_ring.irq_queue);
+		if (dev_priv->bsd_ring.waiting_gem_seqno)
+			DRM_WAKEUP(&dev_priv->bsd_ring.irq_queue);
 		return;
 	}