Skip to content

Commit 430d981

Browse files
mattropegregkh
authored andcommitted
drm/i915/xelpg: Extend some workarounds/tuning to gfx version 12.74
[ Upstream commit c44d4ef ] Some of our existing Xe_LPG workarounds and tuning are also applicable to the version 12.74 variant. Extend the condition bounds accordingly. Also fix the comment on Wa_14018575942 while we're at it. v2: Extend some more workarounds (Harish) Signed-off-by: Matt Roper <matthew.d.roper@intel.com> Signed-off-by: Harish Chegondi <harish.chegondi@intel.com> Signed-off-by: Haridhar Kalvala <haridhar.kalvala@intel.com> Reviewed-by: Matt Atwood <matthew.s.atwood@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240108122738.14399-4-haridhar.kalvala@intel.com Stable-dep-of: 186bce6 ("drm/i915/mtl: Update workaround 14018575942") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 786629d commit 430d981

File tree

3 files changed

+18
-12
lines changed

3 files changed

+18
-12
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ u32 *gen12_emit_aux_table_inv(struct intel_engine_cs *engine, u32 *cs)
226226
static int mtl_dummy_pipe_control(struct i915_request *rq)
227227
{
228228
/* Wa_14016712196 */
229-
if (IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12, 71)) ||
229+
if (IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12, 74)) ||
230230
IS_DG2(rq->i915)) {
231231
u32 *cs;
232232

@@ -822,7 +822,7 @@ u32 *gen12_emit_fini_breadcrumb_rcs(struct i915_request *rq, u32 *cs)
822822
flags |= PIPE_CONTROL_FLUSH_L3;
823823

824824
/* Wa_14016712196 */
825-
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)) || IS_DG2(i915))
825+
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74)) || IS_DG2(i915))
826826
/* dummy PIPE_CONTROL + depth flush */
827827
cs = gen12_emit_pipe_control(cs, 0,
828828
PIPE_CONTROL_DEPTH_CACHE_FLUSH, 0);

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

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -789,8 +789,13 @@ static void xelpg_ctx_gt_tuning_init(struct intel_engine_cs *engine,
789789

790790
dg2_ctx_gt_tuning_init(engine, wal);
791791

792-
if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_B0, STEP_FOREVER) ||
793-
IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_B0, STEP_FOREVER))
792+
/*
793+
* Due to Wa_16014892111, the DRAW_WATERMARK tuning must be done in
794+
* gen12_emit_indirect_ctx_rcs() rather than here on some early
795+
* steppings.
796+
*/
797+
if (!(IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_A0, STEP_B0) ||
798+
IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_A0, STEP_B0)))
794799
wa_add(wal, DRAW_WATERMARK, VERT_WM_VAL, 0x3FF, 0, false);
795800
}
796801

@@ -908,7 +913,7 @@ __intel_engine_init_ctx_wa(struct intel_engine_cs *engine,
908913
if (engine->class != RENDER_CLASS)
909914
goto done;
910915

911-
if (IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 71)))
916+
if (IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 74)))
912917
xelpg_ctx_workarounds_init(engine, wal);
913918
else if (IS_PONTEVECCHIO(i915))
914919
; /* noop; none at this time */
@@ -1643,7 +1648,7 @@ pvc_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
16431648
static void
16441649
xelpg_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
16451650
{
1646-
/* Wa_14018778641 / Wa_18018781329 */
1651+
/* Wa_14018575942 / Wa_18018781329 */
16471652
wa_mcr_write_or(wal, COMP_MOD_CTRL, FORCE_MISS_FTLB);
16481653

16491654
/* Wa_22016670082 */
@@ -1710,7 +1715,7 @@ xelpmp_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
17101715
*/
17111716
static void gt_tuning_settings(struct intel_gt *gt, struct i915_wa_list *wal)
17121717
{
1713-
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
1718+
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74))) {
17141719
wa_mcr_write_or(wal, XEHP_L3SCQREG7, BLEND_FILL_CACHING_OPT_DIS);
17151720
wa_mcr_write_or(wal, XEHP_SQCM, EN_32B_ACCESS);
17161721
}
@@ -1743,7 +1748,7 @@ gt_init_workarounds(struct intel_gt *gt, struct i915_wa_list *wal)
17431748
return;
17441749
}
17451750

1746-
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
1751+
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74)))
17471752
xelpg_gt_workarounds_init(gt, wal);
17481753
else if (IS_PONTEVECCHIO(i915))
17491754
pvc_gt_workarounds_init(gt, wal);
@@ -2216,7 +2221,7 @@ void intel_engine_init_whitelist(struct intel_engine_cs *engine)
22162221

22172222
if (engine->gt->type == GT_MEDIA)
22182223
; /* none yet */
2219-
else if (IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 71)))
2224+
else if (IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 74)))
22202225
xelpg_whitelist_build(engine);
22212226
else if (IS_PONTEVECCHIO(i915))
22222227
pvc_whitelist_build(engine);
@@ -2828,7 +2833,7 @@ add_render_compute_tuning_settings(struct intel_gt *gt,
28282833
{
28292834
struct drm_i915_private *i915 = gt->i915;
28302835

2831-
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)) || IS_DG2(i915))
2836+
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74)) || IS_DG2(i915))
28322837
wa_mcr_write_clr_set(wal, RT_CTRL, STACKID_CTRL, STACKID_CTRL_512);
28332838

28342839
/*
@@ -2881,7 +2886,8 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
28812886
}
28822887

28832888
if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_B0, STEP_FOREVER) ||
2884-
IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_B0, STEP_FOREVER))
2889+
IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_B0, STEP_FOREVER) ||
2890+
IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 74), IP_VER(12, 74)))
28852891
/* Wa_14017856879 */
28862892
wa_mcr_masked_en(wal, GEN9_ROW_CHICKEN3, MTL_DISABLE_FIX_FOR_EOT_FLUSH);
28872893

drivers/gpu/drm/i915/i915_perf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3225,7 +3225,7 @@ u32 i915_perf_oa_timestamp_frequency(struct drm_i915_private *i915)
32253225
struct intel_gt *gt = to_gt(i915);
32263226

32273227
/* Wa_18013179988 */
3228-
if (IS_DG2(i915) || IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
3228+
if (IS_DG2(i915) || IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74))) {
32293229
intel_wakeref_t wakeref;
32303230
u32 reg, shift;
32313231

0 commit comments

Comments
 (0)