drm/i915/gen8: Move INSTPM WA to common function
authorArun Siluvery <arun.siluvery@linux.intel.com>
Fri, 25 Sep 2015 16:40:38 +0000 (17:40 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 30 Sep 2015 08:20:28 +0000 (10:20 +0200)
Signed-off-by: Arun Siluvery <arun.siluvery@linux.intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_ringbuffer.c

index 2c4f097acd0e94bcb02f2597d1558b664c34a9ab..76e548889d6a494d57068d1b21f064ea599304e8 100644 (file)
@@ -802,6 +802,10 @@ static int wa_add(struct drm_i915_private *dev_priv,
 
 static int gen8_init_workarounds(struct intel_engine_cs *ring)
 {
+       struct drm_device *dev = ring->dev;
+       struct drm_i915_private *dev_priv = dev->dev_private;
+
+       WA_SET_BIT_MASKED(INSTPM, INSTPM_FORCE_ORDERING);
 
        return 0;
 }
@@ -816,8 +820,6 @@ static int bdw_init_workarounds(struct intel_engine_cs *ring)
        if (ret)
                return ret;
 
-       WA_SET_BIT_MASKED(INSTPM, INSTPM_FORCE_ORDERING);
-
        /* WaDisableAsyncFlipPerfMode:bdw */
        WA_SET_BIT_MASKED(MI_MODE, ASYNC_FLIP_PERF_DISABLE);
 
@@ -887,8 +889,6 @@ static int chv_init_workarounds(struct intel_engine_cs *ring)
        if (ret)
                return ret;
 
-       WA_SET_BIT_MASKED(INSTPM, INSTPM_FORCE_ORDERING);
-
        /* WaDisableAsyncFlipPerfMode:chv */
        WA_SET_BIT_MASKED(MI_MODE, ASYNC_FLIP_PERF_DISABLE);