Skip to content

Commit 168c6d2

Browse files
mikuintickle
authored andcommitted
drm/i915: Add engine scratch register to live_lrc_fixed
General purpose registers are per engine and in a fixed location. Add to live_lrc_fixed. Signed-off-by: Mika Kuoppala <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 9669a50 commit 168c6d2

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,18 @@ static int lrc_ring_mi_mode(const struct intel_engine_cs *engine)
250250
return -1;
251251
}
252252

253+
static int lrc_ring_gpr0(const struct intel_engine_cs *engine)
254+
{
255+
if (INTEL_GEN(engine->i915) >= 12)
256+
return 0x74;
257+
else if (INTEL_GEN(engine->i915) >= 9)
258+
return 0x68;
259+
else if (engine->class == RENDER_CLASS)
260+
return 0xd8;
261+
else
262+
return -1;
263+
}
264+
253265
static int lrc_ring_wa_bb_per_ctx(const struct intel_engine_cs *engine)
254266
{
255267
if (INTEL_GEN(engine->i915) >= 12)

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4613,6 +4613,11 @@ static int live_lrc_fixed(void *arg)
46134613
CTX_TIMESTAMP - 1,
46144614
"RING_CTX_TIMESTAMP"
46154615
},
4616+
{
4617+
i915_mmio_reg_offset(GEN8_RING_CS_GPR(engine->mmio_base, 0)),
4618+
lrc_ring_gpr0(engine),
4619+
"RING_CS_GPR0"
4620+
},
46164621
{ },
46174622
}, *t;
46184623
u32 *hw;

0 commit comments

Comments
 (0)