]> git.itanic.dy.fi Git - linux-stable/commit
drm/xe: Make DRM_XE_DEVICE_QUERY_ENGINES future proof
authorJosé Roberto de Souza <jose.souza@intel.com>
Wed, 22 Nov 2023 14:38:22 +0000 (14:38 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:45:12 +0000 (11:45 -0500)
commit2bec30715435824c2ea03714038f0ee7a4b5c698
treedec33e11677a0fdda46ab6fed312bf014b98e217
parent6b8c1edc4f698d7e7e3cd5852bb5b20e93ab01b8
drm/xe: Make DRM_XE_DEVICE_QUERY_ENGINES future proof

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

v2: Reduce reserved[] to 3 u64 (Matthew Brost)

Cc: Francois Dugast <francois.dugast@intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
[Rodrigo Rebased]
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
drivers/gpu/drm/xe/xe_query.c
include/uapi/drm/xe_drm.h