drm/xe/uapi: Replace useless 'instance' per unique gt_id
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Wed, 20 Sep 2023 19:29:34 +0000 (15:29 -0400)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:43:18 +0000 (11:43 -0500)
Let's have a single GT ID per GT within the PCI Device Card.

Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Francois Dugast <francois.dugast@intel.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
drivers/gpu/drm/xe/xe_gt_types.h
drivers/gpu/drm/xe/xe_pci.c
drivers/gpu/drm/xe/xe_query.c
include/uapi/drm/xe_drm.h

index d4310be3e1e7c82b2b02ddb892f65156eddd4ff6..d3f2793684e2df6b1214e5745da0298589a49314 100644 (file)
@@ -105,7 +105,7 @@ struct xe_gt {
        struct {
                /** @type: type of GT */
                enum xe_gt_type type;
-               /** @id: id of GT */
+               /** @id: Unique ID of this GT within the PCI Device */
                u8 id;
                /** @clock_freq: clock frequency */
                u32 clock_freq;
index 9963772caabbd9c2b5eb9be1027a9ee73ecc917b..eec2b852c7aaa7e8cd6e0de51886c59d54c6655e 100644 (file)
@@ -593,10 +593,6 @@ static int xe_info_init(struct xe_device *xe,
                        return PTR_ERR(tile->primary_gt);
 
                gt = tile->primary_gt;
-               /*
-                * FIXME: GT numbering scheme may change depending on UAPI
-                * decisions.
-                */
                gt->info.id = xe->info.gt_count++;
                gt->info.type = XE_GT_TYPE_MAIN;
                gt->info.__engine_mask = graphics_desc->hw_engine_mask;
index cd3e0f3208a6c17b527c117ad6b72782a0f2bfed..3bff06299e652ecbb243b39ebb1a59684e002323 100644 (file)
@@ -376,7 +376,7 @@ static int query_gts(struct xe_device *xe, struct drm_xe_device_query *query)
                        gts->gts[id].type = XE_QUERY_GT_TYPE_REMOTE;
                else
                        gts->gts[id].type = XE_QUERY_GT_TYPE_MAIN;
-               gts->gts[id].instance = id;
+               gts->gts[id].gt_id = gt->info.id;
                gts->gts[id].clock_freq = gt->info.clock_freq;
                if (!IS_DGFX(xe))
                        gts->gts[id].native_mem_regions = 0x1;
index 53b7b2ddf3042fccc024140ca8663b66ef8ce9b4..11bc4dc2c78cf3f38c73f9abc024e859ddb84b19 100644 (file)
@@ -348,8 +348,8 @@ struct drm_xe_query_gt {
 #define XE_QUERY_GT_TYPE_MEDIA         2
        /** @type: GT type: Main, Remote, or Media */
        __u16 type;
-       /** @instance: Instance of this GT in the GT list */
-       __u16 instance;
+       /** @gt_id: Unique ID of this GT within the PCI Device */
+       __u16 gt_id;
        /** @clock_freq: A clock frequency for timestamp */
        __u32 clock_freq;
        /** @features: Reserved for future information about GT features */