[kernel/f15] drm-i915-snb-irq-stalls-fix.patch: fix Sandybridge IRQ stalls

Dave Airlie airlied at fedoraproject.org
Fri Jun 24 03:15:40 UTC 2011


commit bc6617c233dbb5a112ec0b41ec394517ea2efb82
Author: Dave Airlie <airlied at redhat.com>
Date:   Thu Jun 23 23:13:47 2011 -0400

    drm-i915-snb-irq-stalls-fix.patch: fix Sandybridge IRQ stalls

 drm-i915-snb-irq-stalls-fix.patch |   53 +++++++++++++++++++++++++++++++++++++
 kernel.spec                       |    5 +++
 2 files changed, 58 insertions(+), 0 deletions(-)
---
diff --git a/drm-i915-snb-irq-stalls-fix.patch b/drm-i915-snb-irq-stalls-fix.patch
new file mode 100644
index 0000000..acf64da
--- /dev/null
+++ b/drm-i915-snb-irq-stalls-fix.patch
@@ -0,0 +1,53 @@
+commit 498e720b96379d8ee9c294950a01534a73defcf3
+Author: Daniel J Blueman <daniel.blueman at gmail.com>
+Date:   Fri Jun 17 11:32:19 2011 -0700
+
+    drm/i915: Fix gen6 (SNB) missed BLT ring interrupts.
+    
+    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)
+    
+    Cc: stable at kernel.org
+    Signed-off-by: Daniel J Blueman <daniel.blueman at gmail.com>
+    Signed-off-by: Eric Anholt <eric at anholt.net>
+    Tested-by: Chris Wilson <chris at chris-wilson.co.uk> [v1]
+    Tested-by: Eric Anholt <eric at anholt.net> [v1,v3]
+    	   (incidence of the bug with a testcase went from avg 2/1000 to
+    	   0/12651 in the latest test run (plus more for v1))
+    Tested-by: Kenneth Graunke <kenneth at whitecape.org> [v1]
+    Tested-by: Robert Hooker <robert.hooker at canonical.com> [v1]
+    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=33394
+    Signed-off-by: Dave Airlie <airlied at redhat.com>
+
+diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
+index b9fafe3..9e34a1a 100644
+--- a/drivers/gpu/drm/i915/i915_irq.c
++++ b/drivers/gpu/drm/i915/i915_irq.c
+@@ -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 */
+ 
diff --git a/kernel.spec b/kernel.spec
index 17ef977..8007654 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -685,6 +685,7 @@ Patch1825: drm-intel-make-lvds-work.patch
 Patch1826: drm-intel-edp-fixes.patch
 Patch1828: drm-intel-eeebox-eb1007-quirk.patch
 Patch1829: drm-intel-restore-mode.patch
+Patch1830: drm-i915-snb-irq-stalls-fix.patch
 # radeon - new hw + fixes for fusion and t500 regression
 Patch1839: drm-radeon-fix-regression-on-atom-cards-with-hardcoded-EDID-record.patch
 Patch1840: drm-radeon-update.patch
@@ -1341,6 +1342,7 @@ ApplyPatch drm-intel-edp-fixes.patch
 ApplyPatch drm-i915-fix-pipelined-fencing.patch
 ApplyPatch drm-intel-eeebox-eb1007-quirk.patch
 ApplyPatch drm-intel-restore-mode.patch
+ApplyPatch drm-i915-snb-irq-stalls-fix.patch
 
 # radeon DRM (add cayman support)
 ApplyPatch drm-radeon-fix-regression-on-atom-cards-with-hardcoded-EDID-record.patch -R
@@ -2019,6 +2021,9 @@ fi
 # and build.
 
 %changelog
+* Thu Jun 23 2011 Dave Airlie <airlied at redhat.com>
+- drm-i915-snb-irq-stalls-fix.patch: fix Sandybridge IRQ stalls
+
 * Thu Jun 23 2011 Dave Airlie <airlied at redhat.com> 
 - drm-radeon-update3.patch: more radeon fixes backport
 


More information about the scm-commits mailing list