Skip to content

Commit 75444cf

Browse files
lucasdemarchirodrigovivi
authored andcommitted
drm/i915/mtl: Fix bcs default context
Commit 0d0e7d1 ("drm/i915/mtl: Define engine context layouts") added the engine context for Meteor Lake. In a second revision of the patch it was believed the xcs offsets were wrong due to a tagging issue in the spec. The first version was actually correct, as shown by the intel_lrc_live_selftests/live_lrc_layout test: i915: Running gt_lrc i915: Running intel_lrc_live_selftests/live_lrc_layout bcs0: LRI command mismatch at dword 1, expected 1108101d found 11081019 [drm:drm_helper_probe_single_connector_modes [drm_kms_helper]] [CONNECTOR:236:DP-1] disconnected bcs0: HW register image: [0000] 00000000 1108101d 00022244 ffff0008 00022034 00000088 00022030 00000088 ... bcs0: SW register image: [0000] 00000000 11081019 00022244 00090009 00022034 00000000 00022030 00000000 The difference in the 2 additional dwords (0x1d vs 0x19) are the offsets 0x120 / 0x124 that are indeed part of the context image. Bspec: 45585 Fixes: 0d0e7d1 ("drm/i915/mtl: Define engine context layouts") Signed-off-by: Lucas De Marchi <[email protected]> Signed-off-by: Radhakrishna Sripada <[email protected]> Reviewed-by: Matt Roper <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit ca54a9a) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 2241ab5 commit 75444cf

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

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

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -288,39 +288,6 @@ static const u8 dg2_xcs_offsets[] = {
288288
END
289289
};
290290

291-
static const u8 mtl_xcs_offsets[] = {
292-
NOP(1),
293-
LRI(13, POSTED),
294-
REG16(0x244),
295-
REG(0x034),
296-
REG(0x030),
297-
REG(0x038),
298-
REG(0x03c),
299-
REG(0x168),
300-
REG(0x140),
301-
REG(0x110),
302-
REG(0x1c0),
303-
REG(0x1c4),
304-
REG(0x1c8),
305-
REG(0x180),
306-
REG16(0x2b4),
307-
NOP(4),
308-
309-
NOP(1),
310-
LRI(9, POSTED),
311-
REG16(0x3a8),
312-
REG16(0x28c),
313-
REG16(0x288),
314-
REG16(0x284),
315-
REG16(0x280),
316-
REG16(0x27c),
317-
REG16(0x278),
318-
REG16(0x274),
319-
REG16(0x270),
320-
321-
END
322-
};
323-
324291
static const u8 gen8_rcs_offsets[] = {
325292
NOP(1),
326293
LRI(14, POSTED),
@@ -739,9 +706,7 @@ static const u8 *reg_offsets(const struct intel_engine_cs *engine)
739706
else
740707
return gen8_rcs_offsets;
741708
} else {
742-
if (GRAPHICS_VER_FULL(engine->i915) >= IP_VER(12, 70))
743-
return mtl_xcs_offsets;
744-
else if (GRAPHICS_VER_FULL(engine->i915) >= IP_VER(12, 55))
709+
if (GRAPHICS_VER_FULL(engine->i915) >= IP_VER(12, 55))
745710
return dg2_xcs_offsets;
746711
else if (GRAPHICS_VER(engine->i915) >= 12)
747712
return gen12_xcs_offsets;

0 commit comments

Comments
 (0)