From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: <intel-xe@lists.freedesktop.org>
Cc: Matt Roper <matthew.d.roper@intel.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Subject: [Intel-xe] [RFC 5/5] drm/xe/uapi: Rename gts to gt_list.
Date: Fri, 8 Sep 2023 16:33:02 -0400 [thread overview]
Message-ID: <20230908203302.449041-6-rodrigo.vivi@intel.com> (raw)
In-Reply-To: <20230908203302.449041-1-rodrigo.vivi@intel.com>
During the uapi review it was identified a possible confusion
with the plural of acronym with a new acronym. So the
recommendation is to go with gt_list instead.
Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
---
drivers/gpu/drm/xe/xe_query.c | 40 +++++++++++++++++------------------
include/uapi/drm/xe_drm.h | 18 ++++++++--------
2 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
index 280274b7a507..92d4ec611c49 100644
--- a/drivers/gpu/drm/xe/xe_query.c
+++ b/drivers/gpu/drm/xe/xe_query.c
@@ -210,14 +210,14 @@ static int query_config(struct xe_device *xe, struct drm_xe_device_query *query)
return 0;
}
-static int query_gts(struct xe_device *xe, struct drm_xe_device_query *query)
+static int query_gt_list(struct xe_device *xe, struct drm_xe_device_query *query)
{
struct xe_gt *gt;
- size_t size = sizeof(struct drm_xe_query_gts) +
+ size_t size = sizeof(struct drm_xe_query_gt_list) +
xe->info.gt_count * sizeof(struct drm_xe_query_gt);
- struct drm_xe_query_gts __user *query_ptr =
+ struct drm_xe_query_gt_list __user *query_ptr =
u64_to_user_ptr(query->data);
- struct drm_xe_query_gts *gts;
+ struct drm_xe_query_gt_list *gt_list;
u8 id;
if (query->size == 0) {
@@ -227,34 +227,34 @@ static int query_gts(struct xe_device *xe, struct drm_xe_device_query *query)
return -EINVAL;
}
- gts = kzalloc(size, GFP_KERNEL);
- if (!gts)
+ gt_list = kzalloc(size, GFP_KERNEL);
+ if (!gt_list)
return -ENOMEM;
- gts->num_gt = xe->info.gt_count;
+ gt_list->num_gt = xe->info.gt_count;
for_each_gt(gt, xe, id) {
if (xe_gt_is_media_type(gt))
- gts->gts[id].type = XE_QUERY_GT_TYPE_MEDIA;
+ gt_list->gt_list[id].type = XE_QUERY_GT_TYPE_MEDIA;
else if (gt_to_tile(gt)->id > 0)
- gts->gts[id].type = XE_QUERY_GT_TYPE_REMOTE;
+ gt_list->gt_list[id].type = XE_QUERY_GT_TYPE_REMOTE;
else
- gts->gts[id].type = XE_QUERY_GT_TYPE_MAIN;
- gts->gts[id].gt_id = gt->info.id;
- gts->gts[id].clock_freq = gt->info.clock_freq;
+ gt_list->gt_list[id].type = XE_QUERY_GT_TYPE_MAIN;
+ gt_list->gt_list[id].gt_id = gt->info.id;
+ gt_list->gt_list[id].clock_freq = gt->info.clock_freq;
if (!IS_DGFX(xe))
- gts->gts[id].native_mem_regions = 0x1;
+ gt_list->gt_list[id].native_mem_regions = 0x1;
else
- gts->gts[id].native_mem_regions =
+ gt_list->gt_list[id].native_mem_regions =
BIT(gt_to_tile(gt)->id) << 1;
- gts->gts[id].slow_mem_regions = xe->info.mem_region_mask ^
- gts->gts[id].native_mem_regions;
+ gt_list->gt_list[id].slow_mem_regions = xe->info.mem_region_mask ^
+ gt_list->gt_list[id].native_mem_regions;
}
- if (copy_to_user(query_ptr, gts, size)) {
- kfree(gts);
+ if (copy_to_user(query_ptr, gt_list, size)) {
+ kfree(gt_list);
return -EFAULT;
}
- kfree(gts);
+ kfree(gt_list);
return 0;
}
@@ -366,7 +366,7 @@ static int (* const xe_query_funcs[])(struct xe_device *xe,
query_engines,
query_memory_usage,
query_config,
- query_gts,
+ query_gt_list,
query_hwconfig,
query_gt_topology,
};
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index 81cdd3c95f2f..94b53dc74fa1 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -265,7 +265,7 @@ struct drm_xe_query_config {
/**
* struct drm_xe_query_gt - describe an individual GT.
*
- * To be used with drm_xe_query_gts, which will return a list with all the
+ * To be used with drm_xe_query_gt_list, which will return a list with all the
* existing GT individual descriptions.
* Graphics Technology (GT) is a subset of a GPU/tile that is responsible for
* implementing graphics and/or media operations.
@@ -302,19 +302,19 @@ struct drm_xe_query_gt {
};
/**
- * struct drm_xe_query_gts - describe GTs
+ * struct drm_xe_query_gt_list - A list with GT description items.
*
* If a query is made with a struct drm_xe_device_query where .query
- * is equal to DRM_XE_DEVICE_QUERY_GTS, then the reply uses struct
- * drm_xe_query_gts in .data.
+ * is equal to DRM_XE_DEVICE_QUERY_GT_LIST, then the reply uses struct
+ * drm_xe_query_gt_list in .data.
*/
-struct drm_xe_query_gts {
- /** @num_gt: number of GTs returned in gts */
+struct drm_xe_query_gt_list {
+ /** @num_gt: number of GT items returned in gt_list */
__u32 num_gt;
/** @pad: MBZ */
__u32 pad;
- /** @gts: The GT list returned for this device */
- struct drm_xe_query_gt gts[];
+ /** @gt_list: The GT list returned for this device */
+ struct drm_xe_query_gt gt_list[];
};
/**
@@ -407,7 +407,7 @@ struct drm_xe_device_query {
#define DRM_XE_DEVICE_QUERY_ENGINES 0
#define DRM_XE_DEVICE_QUERY_MEM_USAGE 1
#define DRM_XE_DEVICE_QUERY_CONFIG 2
-#define DRM_XE_DEVICE_QUERY_GTS 3
+#define DRM_XE_DEVICE_QUERY_GT_LIST 3
#define DRM_XE_DEVICE_QUERY_HWCONFIG 4
#define DRM_XE_DEVICE_QUERY_GT_TOPOLOGY 5
/** @query: The type of data to query */
--
2.41.0
next prev parent reply other threads:[~2023-09-08 20:33 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 20:32 [Intel-xe] [RFC 0/5] Some uapi alignment in response to the uapi review Rodrigo Vivi
2023-09-08 20:32 ` [Intel-xe] [RFC 1/5] drm/xe: Kill XE_VM_PROPERTY_BIND_OP_ERROR_CAPTURE_ADDRESS extension Rodrigo Vivi
2023-09-13 18:42 ` Matthew Brost
2023-09-08 20:32 ` [Intel-xe] [RFC 2/5] drm/xe/uapi: Document drm_xe_query_gt Rodrigo Vivi
2023-09-13 19:55 ` Matt Roper
2023-09-13 21:12 ` Rodrigo Vivi
2023-09-13 21:46 ` Matt Roper
2023-09-13 21:55 ` Rodrigo Vivi
2023-09-14 13:57 ` Souza, Jose
2023-09-14 14:07 ` Rodrigo Vivi
2023-09-08 20:33 ` [Intel-xe] [RFC 3/5] drm/xe/uapi: Replace useless 'instance' per unique gt_id Rodrigo Vivi
2023-09-08 20:33 ` [Intel-xe] [RFC 4/5] drm/xe/uapi: Remove unused field of drm_xe_query_gt Rodrigo Vivi
2023-09-08 20:33 ` Rodrigo Vivi [this message]
2023-09-08 20:43 ` [Intel-xe] [RFC 5/5] drm/xe/uapi: Rename gts to gt_list Matt Roper
2023-09-08 20:36 ` [Intel-xe] ✓ CI.Patch_applied: success for Some uapi alignment in response to the uapi review Patchwork
2023-09-08 20:36 ` [Intel-xe] ✓ CI.checkpatch: " Patchwork
2023-09-08 20:37 ` [Intel-xe] ✓ CI.KUnit: " Patchwork
2023-09-08 20:44 ` [Intel-xe] ✓ CI.Build: " Patchwork
2023-09-08 20:45 ` [Intel-xe] ✓ CI.Hooks: " Patchwork
2023-09-08 20:46 ` [Intel-xe] ✓ CI.checksparse: " Patchwork
2023-09-08 21:19 ` [Intel-xe] ✗ CI.BAT: failure " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230908203302.449041-6-rodrigo.vivi@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-xe@lists.freedesktop.org \
--cc=matthew.d.roper@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox