Skip to content

Commit f15f6ca

Browse files
mikuintdanvet
authored andcommitted
drm/i915/gen9: Add WaInPlaceDecompressionHang
Add this workaround to prevent hang when in place compression is used. References: HSD#2135774 Cc: stable@vger.kernel.org Signed-off-by: Mika Kuoppala <mika.kuoppala@intel.com> Reviewed-by: Arun Siluvery <arun.siluvery@linux.intel.com> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com> (cherry picked from commit 4ba9c1f) Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
1 parent c5f87f0 commit f15f6ca

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

drivers/gpu/drm/i915/i915_drv.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2746,6 +2746,8 @@ struct drm_i915_cmd_table {
27462746
#define SKL_REVID_D0 0x3
27472747
#define SKL_REVID_E0 0x4
27482748
#define SKL_REVID_F0 0x5
2749+
#define SKL_REVID_G0 0x6
2750+
#define SKL_REVID_H0 0x7
27492751

27502752
#define IS_SKL_REVID(p, since, until) (IS_SKYLAKE(p) && IS_REVID(p, since, until))
27512753

drivers/gpu/drm/i915/i915_reg.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1686,6 +1686,9 @@ enum skl_disp_power_wells {
16861686

16871687
#define GEN7_TLB_RD_ADDR _MMIO(0x4700)
16881688

1689+
#define GEN9_GAMT_ECO_REG_RW_IA _MMIO(0x4ab0)
1690+
#define GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS (1<<18)
1691+
16891692
#define GAMT_CHKN_BIT_REG _MMIO(0x4ab8)
16901693
#define GAMT_CHKN_DISABLE_DYNAMIC_CREDIT_SHARING (1<<28)
16911694

drivers/gpu/drm/i915/intel_ringbuffer.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,6 +1109,11 @@ static int skl_init_workarounds(struct intel_engine_cs *engine)
11091109
/* WaDisableGafsUnitClkGating:skl */
11101110
WA_SET_BIT(GEN7_UCGCTL4, GEN8_EU_GAUNIT_CLOCK_GATE_DISABLE);
11111111

1112+
/* WaInPlaceDecompressionHang:skl */
1113+
if (IS_SKL_REVID(dev_priv, SKL_REVID_H0, REVID_FOREVER))
1114+
WA_SET_BIT(GEN9_GAMT_ECO_REG_RW_IA,
1115+
GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS);
1116+
11121117
/* WaDisableLSQCROPERFforOCL:skl */
11131118
ret = wa_ring_whitelist_reg(engine, GEN8_L3SQCREG4);
11141119
if (ret)
@@ -1178,6 +1183,11 @@ static int bxt_init_workarounds(struct intel_engine_cs *engine)
11781183
WA_SET_BIT_MASKED(COMMON_SLICE_CHICKEN2,
11791184
GEN8_SBE_DISABLE_REPLAY_BUF_OPTIMIZATION);
11801185

1186+
/* WaInPlaceDecompressionHang:bxt */
1187+
if (IS_BXT_REVID(dev_priv, BXT_REVID_C0, REVID_FOREVER))
1188+
WA_SET_BIT(GEN9_GAMT_ECO_REG_RW_IA,
1189+
GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS);
1190+
11811191
return 0;
11821192
}
11831193

@@ -1225,6 +1235,10 @@ static int kbl_init_workarounds(struct intel_engine_cs *engine)
12251235
GEN7_HALF_SLICE_CHICKEN1,
12261236
GEN7_SBE_SS_CACHE_DISPATCH_PORT_SHARING_DISABLE);
12271237

1238+
/* WaInPlaceDecompressionHang:kbl */
1239+
WA_SET_BIT(GEN9_GAMT_ECO_REG_RW_IA,
1240+
GAMT_ECO_ENABLE_IN_PLACE_DECOMPRESS);
1241+
12281242
/* WaDisableLSQCROPERFforOCL:kbl */
12291243
ret = wa_ring_whitelist_reg(engine, GEN8_L3SQCREG4);
12301244
if (ret)

0 commit comments

Comments
 (0)