aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-01-25 08:04:00 -0500
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-02-13 04:57:07 -0500
commit99ffa1629d737295e569267cf5940758139f9ddb (patch)
tree17066a30afd3aeb27ea917f5dcb0ce74f538c087 /drivers/gpu/drm
parent53d227f282eb9fa4c7cdbfd691fa372b7ca8c4c3 (diff)
drm/i915: enable forcewake voodoo also for gen6
We still have reports of missed irqs even on Sandybridge with the HWSTAM workaround in place. Testing by the bug reporter gets rid of them with the forcewake voodoo and no HWSTAM writes. Because I've slightly botched the rebasing I've left out the ACTHD readback which is also required to get IVB working. Seems to still work on the tester's machine, so I think we should go with the more minmal approach on SNB. Especially since I've only found weak evidence for holding forcewake while waiting for an interrupt to arrive, but none for the ACTHD readback. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45181 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=45332 Tested-by: Nicolas Kalkhof nkalkhof()at()web.de Acked-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_irq.c12
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c6
2 files changed, 2 insertions, 16 deletions
diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c
index 063b4577d4c6..bd6168be63d3 100644
--- a/drivers/gpu/drm/i915/i915_irq.c
+++ b/drivers/gpu/drm/i915/i915_irq.c
@@ -1785,18 +1785,6 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
1785 1785
1786 I915_WRITE(HWSTAM, 0xeffe); 1786 I915_WRITE(HWSTAM, 0xeffe);
1787 1787
1788 if (IS_GEN6(dev)) {
1789 /* Workaround stalls observed on Sandy Bridge GPUs by
1790 * making the blitter command streamer generate a
1791 * write to the Hardware Status Page for
1792 * MI_USER_INTERRUPT. This appears to serialize the
1793 * previous seqno write out before the interrupt
1794 * happens.
1795 */
1796 I915_WRITE(GEN6_BLITTER_HWSTAM, ~GEN6_BLITTER_USER_INTERRUPT);
1797 I915_WRITE(GEN6_BSD_HWSTAM, ~GEN6_BSD_USER_INTERRUPT);
1798 }
1799
1800 /* XXX hotplug from PCH */ 1788 /* XXX hotplug from PCH */
1801 1789
1802 I915_WRITE(DEIMR, 0xffffffff); 1790 I915_WRITE(DEIMR, 0xffffffff);
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 8a983b50a791..e784ebb8cc27 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -798,8 +798,7 @@ gen6_ring_get_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
798 /* It looks like we need to prevent the gt from suspending while waiting 798 /* It looks like we need to prevent the gt from suspending while waiting
799 * for an notifiy irq, otherwise irqs seem to get lost on at least the 799 * for an notifiy irq, otherwise irqs seem to get lost on at least the
800 * blt/bsd rings on ivb. */ 800 * blt/bsd rings on ivb. */
801 if (IS_GEN7(dev)) 801 gen6_gt_force_wake_get(dev_priv);
802 gen6_gt_force_wake_get(dev_priv);
803 802
804 spin_lock(&ring->irq_lock); 803 spin_lock(&ring->irq_lock);
805 if (ring->irq_refcount++ == 0) { 804 if (ring->irq_refcount++ == 0) {
@@ -826,8 +825,7 @@ gen6_ring_put_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
826 } 825 }
827 spin_unlock(&ring->irq_lock); 826 spin_unlock(&ring->irq_lock);
828 827
829 if (IS_GEN7(dev)) 828 gen6_gt_force_wake_put(dev_priv);
830 gen6_gt_force_wake_put(dev_priv);
831} 829}
832 830
833static bool 831static bool