summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFrancois Dugast <francois.dugast@intel.com>2023-11-22 14:38:24 +0000
committerRodrigo Vivi <rodrigo.vivi@intel.com>2023-12-21 11:45:16 -0500
commit4bc9dd98e0a7e8a14386fc8341379ee09e594987 (patch)
tree000c2146edb15ac5915976798d695a6ea55455bd /include
parent4e03b584143e18eabd091061a1716515da928dcb (diff)
downloadlinux-stable-4bc9dd98e0a7e8a14386fc8341379ee09e594987.tar.gz
linux-stable-4bc9dd98e0a7e8a14386fc8341379ee09e594987.tar.bz2
linux-stable-4bc9dd98e0a7e8a14386fc8341379ee09e594987.zip
drm/xe/uapi: Align on a common way to return arrays (memory regions)
The uAPI provides queries which return arrays of elements. As of now the format used in the struct is different depending on which element is queried. Fix this for memory regions by applying the pattern below: struct drm_xe_query_Xs { __u32 num_Xs; struct drm_xe_X Xs[]; ... } This removes "query" in the name of struct drm_xe_query_mem_region as it is not returned from the query IOCTL. There is no functional change. v2: Only rename drm_xe_query_mem_region to drm_xe_mem_region (José Roberto de Souza) v3: Rename usage to mem_regions in xe_query.c (José Roberto de Souza) Signed-off-by: Francois Dugast <francois.dugast@intel.com> Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'include')
-rw-r--r--include/uapi/drm/xe_drm.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
index d7918f6e760f..863963168dc3 100644
--- a/include/uapi/drm/xe_drm.h
+++ b/include/uapi/drm/xe_drm.h
@@ -183,10 +183,10 @@ enum drm_xe_memory_class {
};
/**
- * struct drm_xe_query_mem_region - Describes some region as known to
+ * struct drm_xe_mem_region - Describes some region as known to
* the driver.
*/
-struct drm_xe_query_mem_region {
+struct drm_xe_mem_region {
/**
* @mem_class: The memory class describing this region.
*
@@ -323,12 +323,12 @@ struct drm_xe_query_engine_cycles {
* struct drm_xe_query_mem_regions in .data.
*/
struct drm_xe_query_mem_regions {
- /** @num_regions: number of memory regions returned in @regions */
- __u32 num_regions;
+ /** @num_mem_regions: number of memory regions returned in @mem_regions */
+ __u32 num_mem_regions;
/** @pad: MBZ */
__u32 pad;
- /** @regions: The returned regions for this device */
- struct drm_xe_query_mem_region regions[];
+ /** @mem_regions: The returned memory regions for this device */
+ struct drm_xe_mem_region mem_regions[];
};
/**