Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: <intel-xe@lists.freedesktop.org>
Subject: Re: [PATCH v2 2/5] drm/xe/oa/uapi: Add gt_id to struct drm_xe_oa_unit
Date: Tue, 2 Dec 2025 15:16:26 -0800	[thread overview]
Message-ID: <aS9zSoN9EhvUbqvM@soc-5CG1426VCC.clients.intel.com> (raw)
In-Reply-To: <aS9nxJK9YYbDmpj0@soc-5CG1426VCC.clients.intel.com>

On Tue, Dec 02, 2025 at 02:27:16PM -0800, Umesh Nerlige Ramappa wrote:
>On Mon, Dec 01, 2025 at 06:51:12PM -0800, Ashutosh Dixit wrote:
>>gt_id was previously omitted from 'struct drm_xe_oa_unit' because it could
>>be determine from hwe's attached to the OA unit. However, we now have OA
>>units which don't have any hwe's attached to them. Hence add gt_id to
>>'struct drm_xe_oa_unit' in order to provide this needed information to
>>userspace.
>>
>>Signed-off-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
>>Reviewed-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>>---
>>v2: Change gt_id to u16 (Matt Brost)
>>---
>>drivers/gpu/drm/xe/xe_query.c | 4 +++-
>>include/uapi/drm/xe_drm.h     | 9 ++++++++-
>>2 files changed, 11 insertions(+), 2 deletions(-)
>>
>>diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
>>index a7bf1fd6dd6ac..18bd8047ebfdb 100644
>>--- a/drivers/gpu/drm/xe/xe_query.c
>>+++ b/drivers/gpu/drm/xe/xe_query.c
>>@@ -682,7 +682,9 @@ static int query_oa_units(struct xe_device *xe,
>>			du->capabilities = DRM_XE_OA_CAPS_BASE | DRM_XE_OA_CAPS_SYNCS |
>>					   DRM_XE_OA_CAPS_OA_BUFFER_SIZE |
>>					   DRM_XE_OA_CAPS_WAIT_NUM_REPORTS |
>>-					   DRM_XE_OA_CAPS_OAM;
>>+					   DRM_XE_OA_CAPS_OAM |
>>+					   DRM_XE_OA_CAPS_OA_UNIT_GT_ID;
>>+			du->gt_id = u->gt->info.id;
>>			j = 0;
>>			for_each_hw_engine(hwe, gt, hwe_id) {
>>				if (!xe_hw_engine_is_reserved(hwe) &&
>>diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
>>index 37881b1eb6bad..4413c7f918740 100644
>>--- a/include/uapi/drm/xe_drm.h
>>+++ b/include/uapi/drm/xe_drm.h
>>@@ -1681,12 +1681,19 @@ struct drm_xe_oa_unit {
>>#define DRM_XE_OA_CAPS_OA_BUFFER_SIZE	(1 << 2)
>>#define DRM_XE_OA_CAPS_WAIT_NUM_REPORTS	(1 << 3)
>>#define DRM_XE_OA_CAPS_OAM		(1 << 4)
>>+#define DRM_XE_OA_CAPS_OA_UNIT_GT_ID	(1 << 5)
>>
>>	/** @oa_timestamp_freq: OA timestamp freq */
>>	__u64 oa_timestamp_freq;
>>
>>+	/** @gt_id: gt id for this OA unit */
>>+	__u16 gt_id;
>>+
>>+	/** @reserved1: MBZ */
>>+	__u16 reserved1[3];
>>+
>>	/** @reserved: MBZ */
>>-	__u64 reserved[4];
>>+	__u64 reserved[3];
>
>Maybe I missed this in earlier reviews, AFAIR, we should ensure the 
>MBZ part in the implementation (i.e. check that reserved fields are 
>zero when validating the params). Not sure if things changed with Xe 
>KMD.

Please ignore, since this is output data.

Thanks,
Umesh
>
>Regards,
>Umesh
>>
>>	/** @num_engines: number of engines in @eci array */
>>	__u64 num_engines;
>>-- 
>>2.48.1
>>

  reply	other threads:[~2025-12-02 23:16 UTC|newest]

Thread overview: 19+ 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 [this message]
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 ` [PATCH 5/5] drm/xe/rtp: Whitelist OAM MMIO trigger registers Ashutosh Dixit
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

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=aS9zSoN9EhvUbqvM@soc-5CG1426VCC.clients.intel.com \
    --to=umesh.nerlige.ramappa@intel.com \
    --cc=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