Skip to content

Commit 273500a

Browse files
icklejlahtine-intel
authored andcommitted
drm/i915: Whitelist context-local timestamp in the gen9 cmdparser
Allow batch buffers to read their own _local_ cumulative HW runtime of their logical context. Fixes: 0f2f397 ("drm/i915: Add gen9 BCS cmdparsing") Signed-off-by: Chris Wilson <[email protected]> Cc: Mika Kuoppala <[email protected]> Cc: <[email protected]> # v5.4+ Reviewed-by: Mika Kuoppala <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit f949652) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 882f38b commit 273500a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/gpu/drm/i915/i915_cmd_parser.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -572,6 +572,9 @@ struct drm_i915_reg_descriptor {
572572
#define REG32(_reg, ...) \
573573
{ .addr = (_reg), __VA_ARGS__ }
574574

575+
#define REG32_IDX(_reg, idx) \
576+
{ .addr = _reg(idx) }
577+
575578
/*
576579
* Convenience macro for adding 64-bit registers.
577580
*
@@ -669,6 +672,7 @@ static const struct drm_i915_reg_descriptor gen9_blt_regs[] = {
669672
REG64_IDX(RING_TIMESTAMP, BSD_RING_BASE),
670673
REG32(BCS_SWCTRL),
671674
REG64_IDX(RING_TIMESTAMP, BLT_RING_BASE),
675+
REG32_IDX(RING_CTX_TIMESTAMP, BLT_RING_BASE),
672676
REG64_IDX(BCS_GPR, 0),
673677
REG64_IDX(BCS_GPR, 1),
674678
REG64_IDX(BCS_GPR, 2),

0 commit comments

Comments
 (0)