Skip to content

Commit d14560a

Browse files
Andi Shytitursulin
authored andcommitted
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 <andi.shyti@linux.intel.com> Cc: <stable@vger.kernel.org> # v5.8+ Reviewed-by: Nirmoy Das <nirmoy.das@intel.com> Reviewed-by: Andrzej Hajda <andrzej.hajda@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20230725001950.1014671-2-andi.shyti@linux.intel.com (cherry picked from commit 2f0b927) Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
1 parent 5d0c230 commit d14560a

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

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->engine->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
@@ -332,24 +332,24 @@
332332
#define GEN8_PRIVATE_PAT_HI _MMIO(0x40e0 + 4)
333333
#define GEN10_PAT_INDEX(index) _MMIO(0x40e0 + (index) * 4)
334334
#define BSD_HWS_PGA_GEN7 _MMIO(0x4180)
335-
#define GEN12_GFX_CCS_AUX_NV _MMIO(0x4208)
336-
#define GEN12_VD0_AUX_NV _MMIO(0x4218)
337-
#define GEN12_VD1_AUX_NV _MMIO(0x4228)
335+
336+
#define GEN12_CCS_AUX_INV _MMIO(0x4208)
337+
#define GEN12_VD0_AUX_INV _MMIO(0x4218)
338+
#define GEN12_VE0_AUX_INV _MMIO(0x4238)
339+
#define GEN12_BCS0_AUX_INV _MMIO(0x4248)
338340

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

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

351-
#define GEN12_VE1_AUX_NV _MMIO(0x42b8)
349+
#define GEN12_VD2_AUX_INV _MMIO(0x4298)
350+
#define GEN12_CCS0_AUX_INV _MMIO(0x42c8)
352351
#define AUX_INV REG_BIT(0)
352+
353353
#define VEBOX_HWS_PGA_GEN7 _MMIO(0x4380)
354354

355355
#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
@@ -1367,7 +1367,7 @@ gen12_emit_indirect_ctx_rcs(const struct intel_context *ce, u32 *cs)
13671367
/* hsdes: 1809175790 */
13681368
if (!HAS_FLAT_CCS(ce->engine->i915))
13691369
cs = gen12_emit_aux_table_inv(ce->engine->gt,
1370-
cs, GEN12_GFX_CCS_AUX_NV);
1370+
cs, GEN12_CCS_AUX_INV);
13711371

13721372
/* Wa_16014892111 */
13731373
if (IS_MTL_GRAPHICS_STEP(ce->engine->i915, M, STEP_A0, STEP_B0) ||
@@ -1396,10 +1396,10 @@ gen12_emit_indirect_ctx_xcs(const struct intel_context *ce, u32 *cs)
13961396
if (!HAS_FLAT_CCS(ce->engine->i915)) {
13971397
if (ce->engine->class == VIDEO_DECODE_CLASS)
13981398
cs = gen12_emit_aux_table_inv(ce->engine->gt,
1399-
cs, GEN12_VD0_AUX_NV);
1399+
cs, GEN12_VD0_AUX_INV);
14001400
else if (ce->engine->class == VIDEO_ENHANCEMENT_CLASS)
14011401
cs = gen12_emit_aux_table_inv(ce->engine->gt,
1402-
cs, GEN12_VE0_AUX_NV);
1402+
cs, GEN12_VE0_AUX_INV);
14031403
}
14041404

14051405
return cs;

0 commit comments

Comments
 (0)