diff options
author | Jeff McGee <jeff.mcgee@intel.com> | 2017-10-03 16:34:45 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-10-04 12:52:45 -0400 |
commit | 1e998343f95b46497c56a21de1b14a302256f973 (patch) | |
tree | d798a0617cdad79d8498fc8dc79bdbd2ae0db81f /drivers/gpu/drm/i915/intel_engine_cs.c | |
parent | 3af7a9c6446b4489d208e501d95c5745d89f6628 (diff) |
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
Diffstat (limited to 'drivers/gpu/drm/i915/intel_engine_cs.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_engine_cs.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c index e804a9b816f1..6245970eb3ab 100644 --- a/drivers/gpu/drm/i915/intel_engine_cs.c +++ b/drivers/gpu/drm/i915/intel_engine_cs.c | |||
@@ -1075,8 +1075,10 @@ static int gen9_init_workarounds(struct intel_engine_cs *engine) | |||
1075 | if (ret) | 1075 | if (ret) |
1076 | return ret; | 1076 | return ret; |
1077 | 1077 | ||
1078 | /* WaEnablePreemptionGranularityControlByUMD:skl,bxt,kbl,cfl */ | 1078 | /* WaEnablePreemptionGranularityControlByUMD:skl,bxt,kbl,cfl,[cnl] */ |
1079 | ret= wa_ring_whitelist_reg(engine, GEN8_CS_CHICKEN1); | 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); | ||
1080 | if (ret) | 1082 | if (ret) |
1081 | return ret; | 1083 | return ret; |
1082 | 1084 | ||
@@ -1138,14 +1140,6 @@ static int skl_init_workarounds(struct intel_engine_cs *engine) | |||
1138 | if (ret) | 1140 | if (ret) |
1139 | return ret; | 1141 | return ret; |
1140 | 1142 | ||
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 | |||
1149 | /* WaEnableGapsTsvCreditFix:skl */ | 1143 | /* WaEnableGapsTsvCreditFix:skl */ |
1150 | I915_WRITE(GEN8_GARBCNTL, (I915_READ(GEN8_GARBCNTL) | | 1144 | I915_WRITE(GEN8_GARBCNTL, (I915_READ(GEN8_GARBCNTL) | |
1151 | GEN9_GAPS_TSV_CREDIT_DISABLE)); | 1145 | GEN9_GAPS_TSV_CREDIT_DISABLE)); |
@@ -1278,6 +1272,8 @@ static int cnl_init_workarounds(struct intel_engine_cs *engine) | |||
1278 | WA_SET_BIT_MASKED(HALF_SLICE_CHICKEN3, CNL_FAST_ANISO_L1_BANKING_FIX); | 1272 | WA_SET_BIT_MASKED(HALF_SLICE_CHICKEN3, CNL_FAST_ANISO_L1_BANKING_FIX); |
1279 | 1273 | ||
1280 | /* WaEnablePreemptionGranularityControlByUMD:cnl */ | 1274 | /* WaEnablePreemptionGranularityControlByUMD:cnl */ |
1275 | I915_WRITE(GEN7_FF_SLICE_CS_CHICKEN1, | ||
1276 | _MASKED_BIT_ENABLE(GEN9_FFSC_PERCTX_PREEMPT_CTRL)); | ||
1281 | ret= wa_ring_whitelist_reg(engine, GEN8_CS_CHICKEN1); | 1277 | ret= wa_ring_whitelist_reg(engine, GEN8_CS_CHICKEN1); |
1282 | if (ret) | 1278 | if (ret) |
1283 | return ret; | 1279 | return ret; |