소스 검색

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>
Daniel Vetter 13 년 전
부모
커밋
99ffa1629d
2개의 변경된 파일2개의 추가작업 그리고 16개의 파일을 삭제
  1. 0 12
      drivers/gpu/drm/i915/i915_irq.c
  2. 2 4
      drivers/gpu/drm/i915/intel_ringbuffer.c

+ 0 - 12
drivers/gpu/drm/i915/i915_irq.c

@@ -1785,18 +1785,6 @@ static void ironlake_irq_preinstall(struct drm_device *dev)
 
 
 	I915_WRITE(HWSTAM, 0xeffe);
 	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);
-		I915_WRITE(GEN6_BSD_HWSTAM, ~GEN6_BSD_USER_INTERRUPT);
-	}
-
 	/* XXX hotplug from PCH */
 	/* XXX hotplug from PCH */
 
 
 	I915_WRITE(DEIMR, 0xffffffff);
 	I915_WRITE(DEIMR, 0xffffffff);

+ 2 - 4
drivers/gpu/drm/i915/intel_ringbuffer.c

@@ -798,8 +798,7 @@ gen6_ring_get_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
 	/* It looks like we need to prevent the gt from suspending while waiting
 	/* It looks like we need to prevent the gt from suspending while waiting
 	 * for an notifiy irq, otherwise irqs seem to get lost on at least the
 	 * for an notifiy irq, otherwise irqs seem to get lost on at least the
 	 * blt/bsd rings on ivb. */
 	 * blt/bsd rings on ivb. */
-	if (IS_GEN7(dev))
-		gen6_gt_force_wake_get(dev_priv);
+	gen6_gt_force_wake_get(dev_priv);
 
 
 	spin_lock(&ring->irq_lock);
 	spin_lock(&ring->irq_lock);
 	if (ring->irq_refcount++ == 0) {
 	if (ring->irq_refcount++ == 0) {
@@ -826,8 +825,7 @@ gen6_ring_put_irq(struct intel_ring_buffer *ring, u32 gflag, u32 rflag)
 	}
 	}
 	spin_unlock(&ring->irq_lock);
 	spin_unlock(&ring->irq_lock);
 
 
-	if (IS_GEN7(dev))
-		gen6_gt_force_wake_put(dev_priv);
+	gen6_gt_force_wake_put(dev_priv);
 }
 }
 
 
 static bool
 static bool