summaryrefslogtreecommitdiff
path: root/sys/dev/pci/drm/i915
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2020-06-26 04:54:51 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2020-06-26 04:54:51 +0000
commit195516be3a158ba14b763af019dee4c23a990fe1 (patch)
treee4be7af498fa701b77d5de7f5d367e15d424693b /sys/dev/pci/drm/i915
parent1739fe55fa2dadfc29a313cb55e5cc945afd965c (diff)
drm/i915: Whitelist context-local timestamp in the gen9 cmdparser
From Chris Wilson f11a45d13e11a238868afa6dbe1790ae816ef8af in linux 5.7.y/5.7.6 273500ae71711c040d258a7b3f4b6f44c368fff2 in mainline linux
Diffstat (limited to 'sys/dev/pci/drm/i915')
-rw-r--r--sys/dev/pci/drm/i915/i915_cmd_parser.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/i915/i915_cmd_parser.c b/sys/dev/pci/drm/i915/i915_cmd_parser.c
index ec634f4fa4c..06ee43c6298 100644
--- a/sys/dev/pci/drm/i915/i915_cmd_parser.c
+++ b/sys/dev/pci/drm/i915/i915_cmd_parser.c
@@ -572,6 +572,9 @@ struct drm_i915_reg_descriptor {
#define REG32(_reg, ...) \
{ .addr = (_reg), __VA_ARGS__ }
+#define REG32_IDX(_reg, idx) \
+ { .addr = _reg(idx) }
+
/*
* Convenience macro for adding 64-bit registers.
*
@@ -669,6 +672,7 @@ static const struct drm_i915_reg_descriptor gen9_blt_regs[] = {
REG64_IDX(RING_TIMESTAMP, BSD_RING_BASE),
REG32(BCS_SWCTRL),
REG64_IDX(RING_TIMESTAMP, BLT_RING_BASE),
+ REG32_IDX(RING_CTX_TIMESTAMP, BLT_RING_BASE),
REG64_IDX(BCS_GPR, 0),
REG64_IDX(BCS_GPR, 1),
REG64_IDX(BCS_GPR, 2),