]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: Enable VS timer dispatch.
authorEric Anholt <eric@anholt.net>
Tue, 9 Mar 2010 07:41:55 +0000 (23:41 -0800)
committerEric Anholt <eric@anholt.net>
Wed, 17 Mar 2010 19:59:32 +0000 (12:59 -0700)
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>
drivers/gpu/drm/i915/i915_gem.c
drivers/gpu/drm/i915/i915_reg.h

index e52a277814c0fdb23f909595d1c3e7435be52d45..134973f77069d14030b1cf4d285f59a592f0561a 100644 (file)
@@ -4725,6 +4725,11 @@ i915_gem_init_ringbuffer(struct drm_device *dev)
                        ring->space += ring->Size;
        }
 
+       if (IS_I9XX(dev) && !IS_GEN3(dev)) {
+               I915_WRITE(MI_MODE,
+                          (VS_TIMER_DISPATCH) << 16 | VS_TIMER_DISPATCH);
+       }
+
        return 0;
 }
 
index 1fcc4c9efc00924e7ca3b45d4a35fe40df878fbd..2720bc2cd678bf4e606086175dbc52cfdb3a9c66 100644 (file)
 #define INSTDONE       0x02090
 #define NOPID          0x02094
 #define HWSTAM         0x02098
+
+#define MI_MODE                0x0209c
+# define VS_TIMER_DISPATCH                             (1 << 6)
+
 #define SCPD0          0x0209c /* 915+ only */
 #define IER            0x020a0
 #define IIR            0x020a4