Skip to contentSkip to conversation

drm/i915: Fix gen6 (SNB) missed BLT ring interrupts.

PATCH In review Eric Anholt 2 participants 2 messages Jun 17, 2011 – Jun 18, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Fix gen6 (SNB) missed BLT ring interrupts.

From: Daniel J Blueman <[email protected]>

The failure appeared in dmesg as:

[drm:i915_hangcheck_ring_idle] *ERROR* Hangcheck timer elapsed... blt ring idle [waiting on 35064155, at 35064155], missed IRQ?

This works around that problem on by making the blitter command streamer write interrupt state to the Hardware Status Page when a MI_USER_INTERRUPT command is decoded, which appears to force the seqno out to memory before the interrupt happens.

v1->v2: Moved to prior interrupt handler installation and RMW flags as per feedback.
v2->v3: Removed RMW of flags (by anholt)

(incidence of the bug with a testcase went from avg 2/1000 to 0/12651 in the latest test run (plus more for v1))

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33394

---
 drivers/gpu/drm/i915/i915_irq.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
drivers/gpu/drm/i915/i915_irq.c +10 -0
index b79619a..0263717 100644
@@ -1740,6 +1740,16 @@ void ironlake_irq_preinstall(struct drm_device *dev)
 		INIT_WORK(&dev_priv->rps_work, gen6_pm_rps_work);
 
 	I915_WRITE(HWSTAM, 0xeffe);
+	if (IS_GEN6(dev)) {
+		/* Workaround stalls observed on Sandy Bridge GPUs by
+		 * making the blitter command streamer generate a
+		 * write to the Hardware Status Page for
+		 * MI_USER_INTERRUPT.  This appears to serialize the
+		 * previous seqno write out before the interrupt
+		 * happens.
+		 */
+		I915_WRITE(GEN6_BLITTER_HWSTAM, ~GEN6_BLITTER_USER_INTERRUPT);
+	}
 
 	/* XXX hotplug from PCH */
 
Signature · 1 line
1.7.5.3