Skip to content

Commit 2f0b927

Browse files
author
Andi Shyti
committed
drm/i915/gt: Cleanup aux invalidation registers
Fix the 'NV' definition postfix that is supposed to be INV. Take the chance to also order properly the registers based on their address and call the GEN12_GFX_CCS_AUX_INV address as GEN12_CCS_AUX_INV like all the other similar registers. Remove also VD1, VD3 and VE1 registers that don't exist and add BCS0 and CCS0. Signed-off-by: Andi Shyti <[email protected]> Cc: <[email protected]> # v5.8+ Reviewed-by: Nirmoy Das <[email protected]> Reviewed-by: Andrzej Hajda <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 766819e commit 2f0b927

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ int gen12_emit_flush_rcs(struct i915_request *rq, u32 mode)
287287

288288
if (!HAS_FLAT_CCS(rq->i915)) {
289289
/* hsdes: 1809175790 */
290-
cs = gen12_emit_aux_table_inv(rq->engine->gt,
291-
cs, GEN12_GFX_CCS_AUX_NV);
290+
cs = gen12_emit_aux_table_inv(rq->engine->gt, cs,
291+
GEN12_CCS_AUX_INV);
292292
}
293293

294294
*cs++ = preparser_disable(false);
@@ -348,10 +348,10 @@ int gen12_emit_flush_xcs(struct i915_request *rq, u32 mode)
348348
if (aux_inv) { /* hsdes: 1809175790 */
349349
if (rq->engine->class == VIDEO_DECODE_CLASS)
350350
cs = gen12_emit_aux_table_inv(rq->engine->gt,
351-
cs, GEN12_VD0_AUX_NV);
351+
cs, GEN12_VD0_AUX_INV);
352352
else
353353
cs = gen12_emit_aux_table_inv(rq->engine->gt,
354-
cs, GEN12_VE0_AUX_NV);
354+
cs, GEN12_VE0_AUX_INV);
355355
}
356356

357357
if (mode & EMIT_INVALIDATE)

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -331,24 +331,24 @@
331331
#define GEN8_PRIVATE_PAT_HI _MMIO(0x40e0 + 4)
332332
#define GEN10_PAT_INDEX(index) _MMIO(0x40e0 + (index) * 4)
333333
#define BSD_HWS_PGA_GEN7 _MMIO(0x4180)
334-
#define GEN12_GFX_CCS_AUX_NV _MMIO(0x4208)
335-
#define GEN12_VD0_AUX_NV _MMIO(0x4218)
336-
#define GEN12_VD1_AUX_NV _MMIO(0x4228)
334+
335+
#define GEN12_CCS_AUX_INV _MMIO(0x4208)
336+
#define GEN12_VD0_AUX_INV _MMIO(0x4218)
337+
#define GEN12_VE0_AUX_INV _MMIO(0x4238)
338+
#define GEN12_BCS0_AUX_INV _MMIO(0x4248)
337339

338340
#define GEN8_RTCR _MMIO(0x4260)
339341
#define GEN8_M1TCR _MMIO(0x4264)
340342
#define GEN8_M2TCR _MMIO(0x4268)
341343
#define GEN8_BTCR _MMIO(0x426c)
342344
#define GEN8_VTCR _MMIO(0x4270)
343345

344-
#define GEN12_VD2_AUX_NV _MMIO(0x4298)
345-
#define GEN12_VD3_AUX_NV _MMIO(0x42a8)
346-
#define GEN12_VE0_AUX_NV _MMIO(0x4238)
347-
348346
#define BLT_HWS_PGA_GEN7 _MMIO(0x4280)
349347

350-
#define GEN12_VE1_AUX_NV _MMIO(0x42b8)
348+
#define GEN12_VD2_AUX_INV _MMIO(0x4298)
349+
#define GEN12_CCS0_AUX_INV _MMIO(0x42c8)
351350
#define AUX_INV REG_BIT(0)
351+
352352
#define VEBOX_HWS_PGA_GEN7 _MMIO(0x4380)
353353

354354
#define GEN12_AUX_ERR_DBG _MMIO(0x43f4)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,7 +1374,7 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs)
13741374
/* hsdes: 1809175790 */
13751375
if (!HAS_FLAT_CCS(ce->engine->i915))
13761376
cs = gen12_emit_aux_table_inv(ce->engine->gt,
1377-
cs, GEN12_GFX_CCS_AUX_NV);
1377+
cs, GEN12_CCS_AUX_INV);
13781378

13791379
/* Wa_16014892111 */
13801380
if (IS_MTL_GRAPHICS_STEP(ce->engine->i915, M, STEP_A0, STEP_B0) ||
@@ -1403,10 +1403,10 @@ gen12_emit_indirect_ctx_xcs(const struct intel_context *ce, u32 *cs)
14031403
if (!HAS_FLAT_CCS(ce->engine->i915)) {
14041404
if (ce->engine->class == VIDEO_DECODE_CLASS)
14051405
cs = gen12_emit_aux_table_inv(ce->engine->gt,
1406-
cs, GEN12_VD0_AUX_NV);
1406+
cs, GEN12_VD0_AUX_INV);
14071407
else if (ce->engine->class == VIDEO_ENHANCEMENT_CLASS)
14081408
cs = gen12_emit_aux_table_inv(ce->engine->gt,
1409-
cs, GEN12_VE0_AUX_NV);
1409+
cs, GEN12_VE0_AUX_INV);
14101410
}
14111411

14121412
return cs;

0 commit comments

Comments
 (0)