drm/xe/uapi: Add Tile ID information to the GT info query
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 22 Nov 2023 14:38:31 +0000 (14:38 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:45:19 +0000 (11:45 -0500)
As an information only. So Userspace can use this information
and be able to correlate different GTs.

Make API symmetric between Engine and GT info.

There's no need right now to include a tile_query entry
since there's no other information that we need from tile
that is not already exposed through different queries.

However, this could be added later if we have different Tile
information that could matter to userspace. But let's keep
the API ready for a direct reference to Tile ID based on
the GT entry.

Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@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

index 3316eab118b1d75f7d5922aa5980e077036e8d96..4461dd1c9e4032aaea324022b3e00a506e92d10c 100644 (file)
@@ -377,6 +377,7 @@ static int query_gt_list(struct xe_device *xe, struct drm_xe_device_query *query
                        gt_list->gt_list[id].type = DRM_XE_QUERY_GT_TYPE_MEDIA;
                else
                        gt_list->gt_list[id].type = DRM_XE_QUERY_GT_TYPE_MAIN;
+               gt_list->gt_list[id].tile_id = gt_to_tile(gt)->id;
                gt_list->gt_list[id].gt_id = gt->info.id;
                gt_list->gt_list[id].reference_clock = gt->info.reference_clock;
                if (!IS_DGFX(xe))
index df3e6fcf9b8b7ea2730ebf39dbfba295fca37d58..584fe08e775c79bbdc46f9bd14e2e1f2e70c710f 100644 (file)
@@ -378,6 +378,8 @@ struct drm_xe_gt {
 #define DRM_XE_QUERY_GT_TYPE_MEDIA             1
        /** @type: GT type: Main or Media */
        __u16 type;
+       /** @tile_id: Tile ID where this GT lives (Information only) */
+       __u16 tile_id;
        /** @gt_id: Unique ID of this GT within the PCI Device */
        __u16 gt_id;
        /** @reference_clock: A clock frequency for timestamp */