Commit 16e076b0 authored by Ashutosh Dixit's avatar Ashutosh Dixit
Browse files

drm/xe/oa/uapi: Add gt_id to struct drm_xe_oa_unit



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: default avatarAshutosh Dixit <ashutosh.dixit@intel.com>
Reviewed-by: default avatarUmesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Link: https://patch.msgid.link/20251202025115.373546-3-ashutosh.dixit@intel.com
parent 89f0b56f
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -685,7 +685,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) &&
+8 −1
Original line number Diff line number Diff line
@@ -1697,12 +1697,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];

	/** @num_engines: number of engines in @eci array */
	__u64 num_engines;