drm/i915: Change HSW WIZ hashing mode to 16x4
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 4 Feb 2014 19:59:20 +0000 (21:59 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 4 Mar 2014 14:39:15 +0000 (15:39 +0100)
BSpec recommends using 8x4 hashing mode when MSAA is used. But in
practice 16x4 seems to have a slight edge in performance (on IVB and
HSW at least). So just use 16x4.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Antti Koskipää <antti.koskipaa@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c

index 57101f2321fd8c7eabb43546da7577648516a22f..7da7360fea359077c4e0fd5e47c0bc599f14c075 100644 (file)
@@ -4873,6 +4873,13 @@ static void haswell_init_clock_gating(struct drm_device *dev)
        I915_WRITE(CACHE_MODE_1,
                   _MASKED_BIT_ENABLE(PIXEL_SUBSPAN_COLLECT_OPT_DISABLE));
 
+       /*
+        * BSpec recommends 8x4 when MSAA is used,
+        * however in practice 16x4 seems fastest.
+        */
+       I915_WRITE(GEN7_GT_MODE,
+                  GEN6_WIZ_HASHING_MASK | GEN6_WIZ_HASHING_16x4);
+
        /* WaSwitchSolVfFArbitrationPriority:hsw */
        I915_WRITE(GAM_ECOCHK, I915_READ(GAM_ECOCHK) | HSW_ECOCHK_ARB_PRIO_SOL);