Selaa lähdekoodia

drm/i915: Enable VS timer dispatch.

This could resolve HW deadlocks where a unit downstream of the VS is
waiting for more input, the VS has one vertex queued up but not
dispatched because it hopes to get one more vertex for 2x4 dispatch,
and software isn't handing more vertices down because it's waiting for
rendering to complete.  The B-Spec says you should always have this
bit set.

Signed-off-by: Eric Anholt <eric@anholt.net>
Eric Anholt 15 vuotta sitten
vanhempi
commit
71cf39b117
2 muutettua tiedostoa jossa 9 lisäystä ja 0 poistoa
  1. 5 0
      drivers/gpu/drm/i915/i915_gem.c
  2. 4 0
      drivers/gpu/drm/i915/i915_reg.h

+ 5 - 0
drivers/gpu/drm/i915/i915_gem.c

@@ -4725,6 +4725,11 @@ i915_gem_init_ringbuffer(struct drm_device *dev)
 			ring->space += ring->Size;
 			ring->space += ring->Size;
 	}
 	}
 
 
+	if (IS_I9XX(dev) && !IS_GEN3(dev)) {
+		I915_WRITE(MI_MODE,
+			   (VS_TIMER_DISPATCH) << 16 | VS_TIMER_DISPATCH);
+	}
+
 	return 0;
 	return 0;
 }
 }
 
 

+ 4 - 0
drivers/gpu/drm/i915/i915_reg.h

@@ -298,6 +298,10 @@
 #define INSTDONE	0x02090
 #define INSTDONE	0x02090
 #define NOPID		0x02094
 #define NOPID		0x02094
 #define HWSTAM		0x02098
 #define HWSTAM		0x02098
+
+#define MI_MODE		0x0209c
+# define VS_TIMER_DISPATCH				(1 << 6)
+
 #define SCPD0		0x0209c /* 915+ only */
 #define SCPD0		0x0209c /* 915+ only */
 #define IER		0x020a0
 #define IER		0x020a0
 #define IIR		0x020a4
 #define IIR		0x020a4