Skip to content

Commit 5dfd73f

Browse files
ickleSasha Levin
authored andcommitted
drm/i915: Whitelist context-local timestamp in the gen9 cmdparser
commit 273500a upstream. 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]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 11c4669 commit 5dfd73f

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
@@ -570,6 +570,9 @@ struct drm_i915_reg_descriptor {
570570
#define REG32(_reg, ...) \
571571
{ .addr = (_reg), __VA_ARGS__ }
572572

573+
#define REG32_IDX(_reg, idx) \
574+
{ .addr = _reg(idx) }
575+
573576
/*
574577
* Convenience macro for adding 64-bit registers.
575578
*
@@ -667,6 +670,7 @@ static const struct drm_i915_reg_descriptor gen9_blt_regs[] = {
667670
REG64_IDX(RING_TIMESTAMP, BSD_RING_BASE),
668671
REG32(BCS_SWCTRL),
669672
REG64_IDX(RING_TIMESTAMP, BLT_RING_BASE),
673+
REG32_IDX(RING_CTX_TIMESTAMP, BLT_RING_BASE),
670674
REG64_IDX(BCS_GPR, 0),
671675
REG64_IDX(BCS_GPR, 1),
672676
REG64_IDX(BCS_GPR, 2),

0 commit comments

Comments
 (0)