[Intel-xe] [PATCH v3 03/16] drm/xe: Make DRM_XE_DEVICE_QUERY_ENGINES future proof

Dixit, Ashutosh ashutosh.dixit at intel.com
Thu Nov 30 20:32:33 UTC 2023


On Thu, 30 Nov 2023 10:39:42 -0800, Francois Dugast wrote:
>
> From: José Roberto de Souza <jose.souza at intel.com>
>
> We have at least 2 future features(OA and future media engines
> capabilities) that will require Xe to provide more information about
> engines to UMDs.
>
> But this information should not just be added to
> drm_xe_engine_class_instance for a couple of reasons:
> - drm_xe_engine_class_instance is used as input to other structs/uAPIs
> and those uAPIs don't care about any of these future new engine fields
> - those new fields are useless information after initialization for
> some UMDs, so it should not need to carry that around
>
> So here my proposal is to make DRM_XE_DEVICE_QUERY_ENGINES return an
> array of drm_xe_query_engine_info that contain
> drm_xe_engine_class_instance and 3 u64s to be used for future features.
>
> Reference OA:
> https://patchwork.freedesktop.org/patch/558362/?series=121084&rev=6

Incidentally we're proposing to remove OA info from
drm_xe_engine_class_instance. The direction now is to collect all OA info
into a separate struct which looks something like this at present, see
drm_xe_engine_class_instance at the bottom:

struct drm_xe_query_oa_units {
	/** @extensions: Pointer to the first extension struct, if any */
	__u64 extensions;

	/** @num_oa_units: number of OA units returned in oau[] */
	__u32 num_oa_units;

	/** @pad: MBZ */
	__u32 pad;

	/** @reserved: MBZ */
	__u64 reserved[4];

	/** @oa_units: OA units returned for this device */
	struct drm_xe_oa_unit {
		/** @oa_unit_id: OA unit ID */
		__u16 oa_unit_id;

		/** @oa_unit_type: OA unit type of @drm_xe_oa_unit_type */
		__u16 oa_unit_type;

		/** @gt_id: GT ID for this OA unit */
		__u16 gt_id;

		/** @open_stream: True if a stream is open on the OA unit */
		__u16 open_stream;

		/** @internal_events: True if internal events are available */
		__u16 internal_events;

		/** @pad: MBZ */
		__u16 pad;

		/** @capabilities: OA capabilities bit-mask */
		__u64 capabilities;

		/** @oa_timestamp_freq: OA timestamp freq */
		__u64 oa_timestamp_freq;

		/** @oa_buf_size: OA buffer size */
		__u64 oa_buf_size;

		/** @reserved: MBZ */
		__u64 reserved[4];

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

		/** @eci: engines attached to this OA unit */
		struct drm_xe_engine_class_instance eci[];
	} oa_units[];
};


More information about the Intel-xe mailing list