Skip to content

Commit 8236820

Browse files
sberbztursulin
authored andcommitted
drm/i915/gt: Relocate compression repacking WA for JSL/EHL
CACHE_MODE_0 registers should be saved and restored as part of the context, not during engine reset. Move the related workaround (Disable Repacking for Compression) from rcs_engine_wa_init() to icl_ctx_workarounds_init() for Jasper Lake and Elkhart Lake platforms. This ensures the WA is applied during context initialisation. BSPEC: 11322 Fixes: 0ddae02 ("drm/i915: Disable compression tricks on JSL") Closes: Fixes: 0ddae02 ("drm/i915: Disable compression tricks on JSL") Signed-off-by: Sebastian Brzezinka <[email protected]> Cc: [email protected] # v6.13+ Reviewed-by: Andi Shyti <[email protected]> Reviewed-by: Krzysztof Karas <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://lore.kernel.org/r/4feaa24094e019e000ceb6011d8cd419b0361b3f.1754902406.git.sebastian.brzezinka@intel.com (cherry picked from commit c9932f0) Signed-off-by: Tvrtko Ursulin <[email protected]>
1 parent ff646d0 commit 8236820

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

drivers/gpu/drm/i915/gt/intel_workarounds.c

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,8 @@ static void cfl_ctx_workarounds_init(struct intel_engine_cs *engine,
634634
static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,
635635
struct i915_wa_list *wal)
636636
{
637+
struct drm_i915_private *i915 = engine->i915;
638+
637639
/* Wa_1406697149 (WaDisableBankHangMode:icl) */
638640
wa_write(wal, GEN8_L3CNTLREG, GEN8_ERRDETBCTRL);
639641

@@ -669,6 +671,15 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine,
669671

670672
/* Wa_1406306137:icl,ehl */
671673
wa_mcr_masked_en(wal, GEN9_ROW_CHICKEN4, GEN11_DIS_PICK_2ND_EU);
674+
675+
if (IS_JASPERLAKE(i915) || IS_ELKHARTLAKE(i915)) {
676+
/*
677+
* Disable Repacking for Compression (masked R/W access)
678+
* before rendering compressed surfaces for display.
679+
*/
680+
wa_masked_en(wal, CACHE_MODE_0_GEN7,
681+
DISABLE_REPACKING_FOR_COMPRESSION);
682+
}
672683
}
673684

674685
/*
@@ -2306,15 +2317,6 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal)
23062317
GEN8_RC_SEMA_IDLE_MSG_DISABLE);
23072318
}
23082319

2309-
if (IS_JASPERLAKE(i915) || IS_ELKHARTLAKE(i915)) {
2310-
/*
2311-
* "Disable Repacking for Compression (masked R/W access)
2312-
* before rendering compressed surfaces for display."
2313-
*/
2314-
wa_masked_en(wal, CACHE_MODE_0_GEN7,
2315-
DISABLE_REPACKING_FOR_COMPRESSION);
2316-
}
2317-
23182320
if (GRAPHICS_VER(i915) == 11) {
23192321
/* This is not an Wa. Enable for better image quality */
23202322
wa_masked_en(wal,

0 commit comments

Comments
 (0)