Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Ashutosh Dixit <ashutosh.dixit@intel.com>
To: intel-xe@lists.freedesktop.org
Cc: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Subject: [PATCH 1/5] drm/xe/oa: Use explicit struct initialization for struct xe_oa_regs
Date: Tue, 25 Nov 2025 19:52:16 -0800	[thread overview]
Message-ID: <20251126035220.13089-2-ashutosh.dixit@intel.com> (raw)
In-Reply-To: <20251126035220.13089-1-ashutosh.dixit@intel.com>

Use explicit struct initialization for struct xe_oa_regs to reduce chance
of error. Also add .oa_mmio_trg field to struct for completeness.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
---
 drivers/gpu/drm/xe/xe_oa.c       | 38 +++++++++++++++++---------------
 drivers/gpu/drm/xe/xe_oa_types.h |  1 +
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index 890c363282ae6..75db5530cb557 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -2566,30 +2566,32 @@ static u32 __hwe_oa_unit(struct xe_hw_engine *hwe)
 static struct xe_oa_regs __oam_regs(u32 base)
 {
 	return (struct xe_oa_regs) {
-		base,
-		OAM_HEAD_POINTER(base),
-		OAM_TAIL_POINTER(base),
-		OAM_BUFFER(base),
-		OAM_CONTEXT_CONTROL(base),
-		OAM_CONTROL(base),
-		OAM_DEBUG(base),
-		OAM_STATUS(base),
-		OAM_CONTROL_COUNTER_SEL_MASK,
+		.base		= base,
+		.oa_head_ptr	= OAM_HEAD_POINTER(base),
+		.oa_tail_ptr	= OAM_TAIL_POINTER(base),
+		.oa_buffer	= OAM_BUFFER(base),
+		.oa_ctx_ctrl	= OAM_CONTEXT_CONTROL(base),
+		.oa_ctrl	= OAM_CONTROL(base),
+		.oa_debug	= OAM_DEBUG(base),
+		.oa_status	= OAM_STATUS(base),
+		.oa_mmio_trg	= OAM_MMIO_TRG(base),
+		.oa_ctrl_counter_select_mask = OAM_CONTROL_COUNTER_SEL_MASK,
 	};
 }
 
 static struct xe_oa_regs __oag_regs(void)
 {
 	return (struct xe_oa_regs) {
-		0,
-		OAG_OAHEADPTR,
-		OAG_OATAILPTR,
-		OAG_OABUFFER,
-		OAG_OAGLBCTXCTRL,
-		OAG_OACONTROL,
-		OAG_OA_DEBUG,
-		OAG_OASTATUS,
-		OAG_OACONTROL_OA_COUNTER_SEL_MASK,
+		.base		= 0,
+		.oa_head_ptr	= OAG_OAHEADPTR,
+		.oa_tail_ptr	= OAG_OATAILPTR,
+		.oa_buffer	= OAG_OABUFFER,
+		.oa_ctx_ctrl	= OAG_OAGLBCTXCTRL,
+		.oa_ctrl	= OAG_OACONTROL,
+		.oa_debug	= OAG_OA_DEBUG,
+		.oa_status	= OAG_OASTATUS,
+		.oa_mmio_trg	= OAG_MMIOTRIGGER,
+		.oa_ctrl_counter_select_mask = OAG_OACONTROL_OA_COUNTER_SEL_MASK,
 	};
 }
 
diff --git a/drivers/gpu/drm/xe/xe_oa_types.h b/drivers/gpu/drm/xe/xe_oa_types.h
index cf080f4121893..08cc8d7c22158 100644
--- a/drivers/gpu/drm/xe/xe_oa_types.h
+++ b/drivers/gpu/drm/xe/xe_oa_types.h
@@ -87,6 +87,7 @@ struct xe_oa_regs {
 	struct xe_reg oa_ctrl;
 	struct xe_reg oa_debug;
 	struct xe_reg oa_status;
+	struct xe_reg oa_mmio_trg;
 	u32 oa_ctrl_counter_select_mask;
 };
 
-- 
2.48.1


  reply	other threads:[~2025-11-26  3:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26  3:52 [PATCH 0/5] OA: More OA and register whitelist changes Ashutosh Dixit
2025-11-26  3:52 ` Ashutosh Dixit [this message]
2025-11-26 18:41   ` [PATCH 1/5] drm/xe/oa: Use explicit struct initialization for struct xe_oa_regs Umesh Nerlige Ramappa
2025-11-26  3:52 ` [PATCH 2/5] drm/xe/oa/uapi: Add gt_id to struct drm_xe_oa_unit Ashutosh Dixit
2025-11-26 20:14   ` Umesh Nerlige Ramappa
2025-11-26 20:42   ` Matthew Brost
2025-11-26 23:08     ` Dixit, Ashutosh
2025-12-01 18:01       ` Rodrigo Vivi
2025-11-26  3:52 ` [PATCH 3/5] drm/xe/oa: Allow exec_queue's to be specified only for OAG OA unit Ashutosh Dixit
2025-11-26 20:15   ` Umesh Nerlige Ramappa
2025-11-26  3:52 ` [PATCH 4/5] drm/xe/rtp: Refactor OAG MMIO trigger register whitelisting Ashutosh Dixit
2025-11-26 21:49   ` Umesh Nerlige Ramappa
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
2025-11-26  5:35 ` ✗ CI.checkpatch: warning for OA: More OA and register whitelist changes Patchwork
2025-11-26  5:36 ` ✓ CI.KUnit: success " Patchwork
2025-11-26  6:14 ` ✓ Xe.CI.BAT: " Patchwork
2025-11-26  9:02 ` ✗ Xe.CI.Full: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2025-12-02  2:51 [PATCH v2 0/5] " Ashutosh Dixit
2025-12-02  2:51 ` [PATCH 1/5] drm/xe/oa: Use explicit struct initialization for struct xe_oa_regs Ashutosh Dixit

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=20251126035220.13089-2-ashutosh.dixit@intel.com \
    --to=ashutosh.dixit@intel.com \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=umesh.nerlige.ramappa@intel.com \
    /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