Skip to content

Commit 843f10c

Browse files
NitinGoteAndi Shyti
authored andcommitted
drm/i915/gt: Add Wa_14019789679
Wa_14019789679 implementation for MTL, ARL and DG2. v2: Corrected condition v3: - Fix indentation (Jani Nikula) - dword size should be 0x1 and initialize dword to 0 instead of MI_NOOP (Tejas) - Use IS_GFX_GT_IP_RANGE() (Tejas) v4: - 3DSTATE_MESH_CONTROL instruction is 3 dwords long Align with dword size. (Roper, Matthew D) - Add RCS engine check. (Tejas) Bspec: 47083 Signed-off-by: Nitin Gote <[email protected]> Reviewed-by: Tejas Upadhyay <[email protected]> Reviewed-by: Matt Roper <[email protected]> Reviewed-by: Andi Shyti <[email protected]> Signed-off-by: Andi Shyti <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent e4a0251 commit 843f10c

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

drivers/gpu/drm/i915/gt/intel_gpu_commands.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@
220220
#define GFX_OP_DESTBUFFER_INFO ((0x3<<29)|(0x1d<<24)|(0x8e<<16)|1)
221221
#define GFX_OP_DRAWRECT_INFO ((0x3<<29)|(0x1d<<24)|(0x80<<16)|(0x3))
222222
#define GFX_OP_DRAWRECT_INFO_I965 ((0x7900<<16)|0x2)
223+
#define CMD_3DSTATE_MESH_CONTROL ((0x3 << 29) | (0x3 << 27) | (0x0 << 24) | (0x77 << 16) | (0x3))
223224

224225
#define XY_CTRL_SURF_INSTR_SIZE 5
225226
#define MI_FLUSH_DW_SIZE 3

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

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,12 @@ int intel_engine_emit_ctx_wa(struct i915_request *rq)
974974
if (ret)
975975
return ret;
976976

977-
cs = intel_ring_begin(rq, (wal->count * 2 + 2));
977+
if ((IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12, 74)) ||
978+
IS_DG2(rq->i915)) && rq->engine->class == RENDER_CLASS)
979+
cs = intel_ring_begin(rq, (wal->count * 2 + 6));
980+
else
981+
cs = intel_ring_begin(rq, (wal->count * 2 + 2));
982+
978983
if (IS_ERR(cs))
979984
return PTR_ERR(cs);
980985

@@ -1004,6 +1009,15 @@ int intel_engine_emit_ctx_wa(struct i915_request *rq)
10041009
}
10051010
*cs++ = MI_NOOP;
10061011

1012+
/* Wa_14019789679 */
1013+
if ((IS_GFX_GT_IP_RANGE(rq->engine->gt, IP_VER(12, 70), IP_VER(12, 74)) ||
1014+
IS_DG2(rq->i915)) && rq->engine->class == RENDER_CLASS) {
1015+
*cs++ = CMD_3DSTATE_MESH_CONTROL;
1016+
*cs++ = 0;
1017+
*cs++ = 0;
1018+
*cs++ = MI_NOOP;
1019+
}
1020+
10071021
intel_uncore_forcewake_put__locked(uncore, fw);
10081022
spin_unlock(&uncore->lock);
10091023
intel_gt_mcr_unlock(wal->gt, flags);

0 commit comments

Comments
 (0)