Skip to content

Commit 1e99834

Browse files
jmcgee4ickle
authored andcommitted
drm/i915/preempt: Fix WaEnablePreemptionGranularityControlByUMD
The WA applies to all production Gen9 and requires both enabling and whitelisting of the per-context preemption control register. v2: Extend to Cannonlake. Signed-off-by: Jeff McGee <jeff.mcgee@intel.com> Signed-off-by: Michał Winiarski <michal.winiarski@intel.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20171003203453.15692-1-chris@chris-wilson.co.uk
1 parent 3af7a9c commit 1e99834

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

drivers/gpu/drm/i915/intel_engine_cs.c

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,8 +1075,10 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine)
10751075
if (ret)
10761076
return ret;
10771077

1078-
/* WaEnablePreemptionGranularityControlByUMD:skl,bxt,kbl,cfl */
1079-
ret= wa_ring_whitelist_reg(engine, GEN8_CS_CHICKEN1);
1078+
/* WaEnablePreemptionGranularityControlByUMD:skl,bxt,kbl,cfl,[cnl] */
1079+
I915_WRITE(GEN7_FF_SLICE_CS_CHICKEN1,
1080+
_MASKED_BIT_ENABLE(GEN9_FFSC_PERCTX_PREEMPT_CTRL));
1081+
ret = wa_ring_whitelist_reg(engine, GEN8_CS_CHICKEN1);
10801082
if (ret)
10811083
return ret;
10821084

@@ -1138,14 +1140,6 @@ static int skl_init_workarounds(struct intel_engine_cs *engine)
11381140
if (ret)
11391141
return ret;
11401142

1141-
/*
1142-
* Actual WA is to disable percontext preemption granularity control
1143-
* until D0 which is the default case so this is equivalent to
1144-
* !WaDisablePerCtxtPreemptionGranularityControl:skl
1145-
*/
1146-
I915_WRITE(GEN7_FF_SLICE_CS_CHICKEN1,
1147-
_MASKED_BIT_ENABLE(GEN9_FFSC_PERCTX_PREEMPT_CTRL));
1148-
11491143
/* WaEnableGapsTsvCreditFix:skl */
11501144
I915_WRITE(GEN8_GARBCNTL, (I915_READ(GEN8_GARBCNTL) |
11511145
GEN9_GAPS_TSV_CREDIT_DISABLE));
@@ -1278,6 +1272,8 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine)
12781272
WA_SET_BIT_MASKED(HALF_SLICE_CHICKEN3, CNL_FAST_ANISO_L1_BANKING_FIX);
12791273

12801274
/* WaEnablePreemptionGranularityControlByUMD:cnl */
1275+
I915_WRITE(GEN7_FF_SLICE_CS_CHICKEN1,
1276+
_MASKED_BIT_ENABLE(GEN9_FFSC_PERCTX_PREEMPT_CTRL));
12811277
ret= wa_ring_whitelist_reg(engine, GEN8_CS_CHICKEN1);
12821278
if (ret)
12831279
return ret;

0 commit comments

Comments
 (0)