Skip to content

Commit c44d4ef

Browse files
committed
drm/i915/xelpg: Extend some workarounds/tuning to gfx version 12.74
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
1 parent 84bf82f commit c44d4ef

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

@@ -911,7 +916,7 @@ __intel_engine_init_ctx_wa(struct intel_engine_cs *engine,
911916
if (engine->class != RENDER_CLASS)
912917
goto done;
913918

914-
if (IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 71)))
919+
if (IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 74)))
915920
xelpg_ctx_workarounds_init(engine, wal);
916921
else if (IS_PONTEVECCHIO(i915))
917922
; /* noop; none at this time */
@@ -1646,7 +1651,7 @@ pvc_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
16461651
static void
16471652
xelpg_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
16481653
{
1649-
/* Wa_14018778641 / Wa_18018781329 */
1654+
/* Wa_14018575942 / Wa_18018781329 */
16501655
wa_mcr_write_or(wal, COMP_MOD_CTRL, FORCE_MISS_FTLB);
16511656

16521657
/* Wa_22016670082 */
@@ -1713,7 +1718,7 @@ xelpmp_gt_workarounds_init(struct intel_gt *gt, struct i915_wa_list *wal)
17131718
*/
17141719
static void gt_tuning_settings(struct intel_gt *gt, struct i915_wa_list *wal)
17151720
{
1716-
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71))) {
1721+
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74))) {
17171722
wa_mcr_write_or(wal, XEHP_L3SCQREG7, BLEND_FILL_CACHING_OPT_DIS);
17181723
wa_mcr_write_or(wal, XEHP_SQCM, EN_32B_ACCESS);
17191724
}
@@ -1746,7 +1751,7 @@ gt_init_workarounds(struct intel_gt *gt, struct i915_wa_list *wal)
17461751
return;
17471752
}
17481753

1749-
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)))
1754+
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74)))
17501755
xelpg_gt_workarounds_init(gt, wal);
17511756
else if (IS_PONTEVECCHIO(i915))
17521757
pvc_gt_workarounds_init(gt, wal);
@@ -2219,7 +2224,7 @@ void intel_engine_init_whitelist(struct intel_engine_cs *engine)
22192224

22202225
if (engine->gt->type == GT_MEDIA)
22212226
; /* none yet */
2222-
else if (IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 71)))
2227+
else if (IS_GFX_GT_IP_RANGE(engine->gt, IP_VER(12, 70), IP_VER(12, 74)))
22232228
xelpg_whitelist_build(engine);
22242229
else if (IS_PONTEVECCHIO(i915))
22252230
pvc_whitelist_build(engine);
@@ -2831,7 +2836,7 @@ add_render_compute_tuning_settings(struct intel_gt *gt,
28312836
{
28322837
struct drm_i915_private *i915 = gt->i915;
28332838

2834-
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 71)) || IS_DG2(i915))
2839+
if (IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 70), IP_VER(12, 74)) || IS_DG2(i915))
28352840
wa_mcr_write_clr_set(wal, RT_CTRL, STACKID_CTRL, STACKID_CTRL_512);
28362841

28372842
/*
@@ -2884,7 +2889,8 @@ general_render_compute_wa_init(struct intel_engine_cs *engine, struct i915_wa_li
28842889
}
28852890

28862891
if (IS_GFX_GT_IP_STEP(gt, IP_VER(12, 70), STEP_B0, STEP_FOREVER) ||
2887-
IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_B0, STEP_FOREVER))
2892+
IS_GFX_GT_IP_STEP(gt, IP_VER(12, 71), STEP_B0, STEP_FOREVER) ||
2893+
IS_GFX_GT_IP_RANGE(gt, IP_VER(12, 74), IP_VER(12, 74)))
28882894
/* Wa_14017856879 */
28892895
wa_mcr_masked_en(wal, GEN9_ROW_CHICKEN3, MTL_DISABLE_FIX_FOR_EOT_FLUSH);
28902896

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)