From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: intel-xe@lists.freedesktop.org
Subject: [PATCH 5/5] drm/xe/rtp: Whitelist OAM MMIO trigger registers
Date: Mon, 1 Dec 2025 18:51:15 -0800 [thread overview]
Message-ID: <20251202025115.373546-6-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20251202025115.373546-1-ashutosh.dixit@intel.com>
Whitelist OAM registers to enable userspace to execute MMIO triggers on OAM
units.
Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
drivers/gpu/drm/xe/regs/xe_oa_regs.h | 8 ++++++++
drivers/gpu/drm/xe/xe_oa.c | 7 +++----
drivers/gpu/drm/xe/xe_reg_whitelist.c | 21 +++++++++++++++++++++
3 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/xe/regs/xe_oa_regs.h b/drivers/gpu/drm/xe/regs/xe_oa_regs.h
index e693a50706f84..1d7908fc0ebae 100644
--- a/drivers/gpu/drm/xe/regs/xe_oa_regs.h
+++ b/drivers/gpu/drm/xe/regs/xe_oa_regs.h
@@ -100,4 +100,12 @@
#define OAM_COMPRESSION_T3_CONTROL XE_REG(0x1c2e00)
#define OAM_LAT_MEASURE_ENABLE REG_BIT(4)
+/* Actual address is MEDIA_GT_GSI_OFFSET + the base addr below */
+#define XE_OAM_SAG_BASE 0x13000
+#define XE_OAM_SCMI_0_BASE 0x14000
+#define XE_OAM_SCMI_1_BASE 0x14800
+#define XE_OAM_SAG_BASE_ADJ (MEDIA_GT_GSI_OFFSET + 0x13000)
+#define XE_OAM_SCMI_0_BASE_ADJ (MEDIA_GT_GSI_OFFSET + 0x14000)
+#define XE_OAM_SCMI_1_BASE_ADJ (MEDIA_GT_GSI_OFFSET + 0x14800)
+
#endif
diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index d63c04e2d4922..cc48663c2b48f 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -2601,11 +2601,10 @@ static struct xe_oa_regs __oag_regs(void)
static void __xe_oa_init_oa_units(struct xe_gt *gt)
{
- /* Actual address is MEDIA_GT_GSI_OFFSET + oam_base_addr[i] */
const u32 oam_base_addr[] = {
- [XE_OAM_UNIT_SAG] = 0x13000,
- [XE_OAM_UNIT_SCMI_0] = 0x14000,
- [XE_OAM_UNIT_SCMI_1] = 0x14800,
+ [XE_OAM_UNIT_SAG] = XE_OAM_SAG_BASE,
+ [XE_OAM_UNIT_SCMI_0] = XE_OAM_SCMI_0_BASE,
+ [XE_OAM_UNIT_SCMI_1] = XE_OAM_SCMI_1_BASE,
};
int i, num_units = gt->oa.num_oa_units;
diff --git a/drivers/gpu/drm/xe/xe_reg_whitelist.c b/drivers/gpu/drm/xe/xe_reg_whitelist.c
index e8e47aa16a5df..da49c69076a47 100644
--- a/drivers/gpu/drm/xe/xe_reg_whitelist.c
+++ b/drivers/gpu/drm/xe/xe_reg_whitelist.c
@@ -83,6 +83,17 @@ static const struct xe_rtp_entry_sr register_whitelist[] = {
#define WHITELIST_OAG_MMIO_TRG \
WHITELIST_OA_MMIO_TRG(OAG_MMIOTRIGGER, OAG_OASTATUS, OAG_OAHEADPTR)
+#define WHITELIST_OAM_MMIO_TRG \
+ WHITELIST_OA_MMIO_TRG(OAM_MMIO_TRG(XE_OAM_SAG_BASE_ADJ), \
+ OAM_STATUS(XE_OAM_SAG_BASE_ADJ), \
+ OAM_HEAD_POINTER(XE_OAM_SAG_BASE_ADJ)), \
+ WHITELIST_OA_MMIO_TRG(OAM_MMIO_TRG(XE_OAM_SCMI_0_BASE_ADJ), \
+ OAM_STATUS(XE_OAM_SCMI_0_BASE_ADJ), \
+ OAM_HEAD_POINTER(XE_OAM_SCMI_0_BASE_ADJ)), \
+ WHITELIST_OA_MMIO_TRG(OAM_MMIO_TRG(XE_OAM_SCMI_1_BASE_ADJ), \
+ OAM_STATUS(XE_OAM_SCMI_1_BASE_ADJ), \
+ OAM_HEAD_POINTER(XE_OAM_SCMI_1_BASE_ADJ))
+
{ XE_RTP_NAME("oag_mmio_trg_rcs"),
XE_RTP_RULES(GRAPHICS_VERSION_RANGE(1200, XE_RTP_END_VERSION_UNDEFINED),
ENGINE_CLASS(RENDER)),
@@ -93,6 +104,16 @@ static const struct xe_rtp_entry_sr register_whitelist[] = {
ENGINE_CLASS(COMPUTE)),
XE_RTP_ACTIONS(WHITELIST_OAG_MMIO_TRG)
},
+ { XE_RTP_NAME("oam_mmio_trg_vcs"),
+ XE_RTP_RULES(MEDIA_VERSION_RANGE(1300, XE_RTP_END_VERSION_UNDEFINED),
+ ENGINE_CLASS(VIDEO_DECODE)),
+ XE_RTP_ACTIONS(WHITELIST_OAM_MMIO_TRG)
+ },
+ { XE_RTP_NAME("oam_mmio_trg_vecs"),
+ XE_RTP_RULES(MEDIA_VERSION_RANGE(1300, XE_RTP_END_VERSION_UNDEFINED),
+ ENGINE_CLASS(VIDEO_ENHANCE)),
+ XE_RTP_ACTIONS(WHITELIST_OAM_MMIO_TRG)
+ },
};
static void whitelist_apply_to_hwe(struct xe_hw_engine *hwe)
--
2.48.1
next prev parent reply other threads:[~2025-12-02 2:51 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-02 2:51 [PATCH v2 0/5] OA: More OA and register whitelist changes Ashutosh Dixit
2025-12-02 2:51 ` [PATCH 1/5] drm/xe/oa: Use explicit struct initialization for struct xe_oa_regs Ashutosh Dixit
2025-12-02 2:51 ` [PATCH v2 2/5] drm/xe/oa/uapi: Add gt_id to struct drm_xe_oa_unit Ashutosh Dixit
2025-12-02 22:27 ` Umesh Nerlige Ramappa
2025-12-02 23:16 ` Umesh Nerlige Ramappa
2025-12-02 2:51 ` [PATCH 3/5] drm/xe/oa: Allow exec_queue's to be specified only for OAG OA unit Ashutosh Dixit
2025-12-02 2:51 ` [PATCH 4/5] drm/xe/rtp: Refactor OAG MMIO trigger register whitelisting Ashutosh Dixit
2025-12-02 2:51 ` Ashutosh Dixit [this message]
2025-12-02 4:03 ` ✗ CI.checkpatch: warning for OA: More OA and register whitelist changes (rev2) Patchwork
2025-12-02 4:05 ` ✓ CI.KUnit: success " Patchwork
2025-12-02 5:06 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-02 7:27 ` ✗ Xe.CI.Full: failure " Patchwork
2025-12-02 21:30 ` Dixit, Ashutosh
2025-12-03 16:19 ` ✗ CI.checkpatch: warning for OA: More OA and register whitelist changes (rev3) Patchwork
2025-12-03 16:21 ` ✓ CI.KUnit: success " Patchwork
2025-12-04 5:01 ` ✗ CI.checkpatch: warning for OA: More OA and register whitelist changes (rev4) Patchwork
2025-12-04 5:03 ` ✓ CI.KUnit: success " Patchwork
2025-12-04 6:04 ` ✓ Xe.CI.BAT: " Patchwork
2025-12-04 6:53 ` ✗ Xe.CI.Full: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2025-11-26 3:52 [PATCH 0/5] OA: More OA and register whitelist changes Ashutosh Dixit
2025-11-26 3:52 ` [PATCH 5/5] drm/xe/rtp: Whitelist OAM MMIO trigger registers Ashutosh Dixit
2025-11-26 21:53 ` Umesh Nerlige Ramappa
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251202025115.373546-6-ashutosh.dixit@intel.com \
--to=ashutosh.dixit@intel.com \
--cc=intel-xe@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox