aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRodrigo Vivi <[email protected]>2023-09-20 15:29:34 -0400
committerRodrigo Vivi <[email protected]>2023-12-21 11:43:18 -0500
commit2519450aaa31948d27db0715c24398b2590517f1 (patch)
tree646e41b4470cc07af213455c1eb0c282e59a21ff
parent25f656f534f4b4eb95140efce37328efbda13af7 (diff)
drm/xe/uapi: Replace useless 'instance' per unique gt_id
Let's have a single GT ID per GT within the PCI Device Card. Signed-off-by: Rodrigo Vivi <[email protected]> Signed-off-by: Francois Dugast <[email protected]> Reviewed-by: Matthew Brost <[email protected]>
-rw-r--r--drivers/gpu/drm/xe/xe_gt_types.h2
-rw-r--r--drivers/gpu/drm/xe/xe_pci.c4
-rw-r--r--drivers/gpu/drm/xe/xe_query.c2
-rw-r--r--include/uapi/drm/xe_drm.h4
4 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/drm/xe/xe_gt_types.h b/drivers/gpu/drm/xe/xe_gt_types.h
index d4310be3e1e7..d3f2793684e2 100644
--- a/drivers/gpu/drm/xe/xe_gt_types.h
+++ b/drivers/gpu/drm/xe/xe_gt_types.h
@@ -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;
diff --git a/drivers/gpu/drm/xe/xe_pci.c b/drivers/gpu/drm/xe/xe_pci.c
index 9963772caabb..eec2b852c7aa 100644
--- a/drivers/gpu/drm/xe/xe_pci.c
+++ b/drivers/gpu/drm/xe/xe_pci.c
@@ -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;
diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
index cd3e0f3208a6..3bff06299e65 100644
--- a/drivers/gpu/drm/xe/xe_query.c
+++ b/drivers/gpu/drm/xe/xe_query.c
@@ -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;
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 53b7b2ddf304..11bc4dc2c78c 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -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 */