Skip to content

Commit d0f5cc5

Browse files
committed
drm/i915/execlists: Terminate the context image with BB_END
In the aub trace utility, the context images are terminated with a MI_BATCH_BUFFER_END; the simulator is reported as complaining otherwise. Do the same for our protocontext image for completeness, and in passing apply the magic bit for gen10 to mark the end of the context image. Reported-by: Lionel Landwerlin <[email protected]> Signed-off-by: Chris Wilson <[email protected]> Cc: Lionel Landwerlin <[email protected]> Reviewed-by: Lionel Landwerlin <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent c358514 commit d0f5cc5

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

drivers/gpu/drm/i915/intel_lrc.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2653,6 +2653,10 @@ static void execlists_init_reg_state(u32 *regs,
26532653

26542654
i915_oa_init_reg_state(engine, ctx, regs);
26552655
}
2656+
2657+
regs[CTX_END] = MI_BATCH_BUFFER_END;
2658+
if (INTEL_GEN(dev_priv) >= 10)
2659+
regs[CTX_END] |= BIT(0);
26562660
}
26572661

26582662
static int

drivers/gpu/drm/i915/intel_lrc_reg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
#define CTX_PDP0_LDW 0x32
3838
#define CTX_LRI_HEADER_2 0x41
3939
#define CTX_R_PWR_CLK_STATE 0x42
40-
#define CTX_GPGPU_CSR_BASE_ADDRESS 0x44
40+
#define CTX_END 0x44
4141

4242
#define CTX_REG(reg_state, pos, reg, val) do { \
4343
u32 *reg_state__ = (reg_state); \

0 commit comments

Comments
 (0)