drm/xe/uapi: Change rsvd to pad in struct drm_xe_class_instance
authorFrancois Dugast <francois.dugast@intel.com>
Tue, 14 Nov 2023 13:34:29 +0000 (13:34 +0000)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 21 Dec 2023 16:44:34 +0000 (11:44 -0500)
Change rsvd to pad in struct drm_xe_class_instance to prevent the field
from being used in future.

v2: Change from fixup to regular commit because this touches the
    uAPI (Francois Dugast)

Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
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>
drivers/gpu/drm/xe/xe_query.c
include/uapi/drm/xe_drm.h

index 565a716302bbbc366fe6c87b76fcd03556fa67ee..48befd9f08120e359f68bf560b9a97ab209da509 100644 (file)
@@ -215,7 +215,10 @@ static int query_engines(struct xe_device *xe,
                                xe_to_user_engine_class[hwe->class];
                        hw_engine_info[i].engine_instance =
                                hwe->logical_instance;
-                       hw_engine_info[i++].gt_id = gt->info.id;
+                       hw_engine_info[i].gt_id = gt->info.id;
+                       hw_engine_info[i].pad = 0;
+
+                       i++;
                }
 
        if (copy_to_user(query_ptr, hw_engine_info, size)) {
index f6346a8351e4955dcb472c62f50ffcd137929dac..a8d351c9fa7cdb65b1c0c917b279129afd091a68 100644 (file)
@@ -141,7 +141,8 @@ struct drm_xe_engine_class_instance {
 
        __u16 engine_instance;
        __u16 gt_id;
-       __u16 rsvd;
+       /** @pad: MBZ */
+       __u16 pad;
 };
 
 /**