diff mbox

[4/4] drm/i915: Display the failing seqno

Message ID 1342464719-8790-5-git-send-email-ben@bwidawsk.net (mailing list archive)
State New, archived
Headers show

Commit Message

Ben Widawsky July 16, 2012, 6:51 p.m. UTC
We'd really want to do a lot more here, but just as the demo for now.

Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 drivers/gpu/drm/i915/i915_irq.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index a376371..864472ee 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -475,11 +475,17 @@  static void snb_gt_irq_handler(struct drm_device *dev,
 		i915_handle_error(dev, false);
 	}
 
-	if (gt_iir & (GT_GEN6_RENDER_TIMEOUT_COUNTER_EXPIRED))
-		DRM_ERROR("Render timeout expired\n");
+	if (gt_iir & (GT_GEN6_RENDER_TIMEOUT_COUNTER_EXPIRED)) {
+		u32 hung_seqno = intel_read_status_page(&dev_priv->ring[RCS],
+							I915_GEM_WATCHDOG_CRUMB_RCS);
+		DRM_ERROR("Render timeout expired (%u)\n", hung_seqno);
+	}
 
-	if (gt_iir & (GT_GEN6_BSD_TIMEOUT_COUNTER_EXPIRED))
-		DRM_ERROR("BSD timeout expired\n");
+	if (gt_iir & (GT_GEN6_BSD_TIMEOUT_COUNTER_EXPIRED)) {
+		u32 hung_seqno = intel_read_status_page(&dev_priv->ring[VCS],
+							I915_GEM_WATCHDOG_CRUMB_VCS);
+		DRM_ERROR("BSD timeout expired (%u)\n", hung_seqno);
+	}
 
 	if (gt_iir & GT_GEN7_L3_PARITY_ERROR_INTERRUPT)
 		ivybridge_handle_parity_error(dev);