[Intel-xe] [PATCH v1 3/8] drm/xe/uapi: Change rsvd to pad in struct drm_xe_class_instance

Rodrigo Vivi rodrigo.vivi at intel.com
Tue Nov 14 13:44:41 UTC 2023


On Tue, Nov 14, 2023 at 01:34:29PM +0000, Francois Dugast wrote:
> 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 at intel.com>
> Signed-off-by: Francois Dugast <francois.dugast at intel.com>

Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

> ---
>  drivers/gpu/drm/xe/xe_query.c | 5 ++++-
>  include/uapi/drm/xe_drm.h     | 3 ++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/xe/xe_query.c b/drivers/gpu/drm/xe/xe_query.c
> index 565a716302bb..48befd9f0812 100644
> --- a/drivers/gpu/drm/xe/xe_query.c
> +++ b/drivers/gpu/drm/xe/xe_query.c
> @@ -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)) {
> diff --git a/include/uapi/drm/xe_drm.h b/include/uapi/drm/xe_drm.h
> index f6346a8351e4..a8d351c9fa7c 100644
> --- a/include/uapi/drm/xe_drm.h
> +++ b/include/uapi/drm/xe_drm.h
> @@ -141,7 +141,8 @@ struct drm_xe_engine_class_instance {
>  
>  	__u16 engine_instance;
>  	__u16 gt_id;
> -	__u16 rsvd;
> +	/** @pad: MBZ */
> +	__u16 pad;
>  };
>  
>  /**
> -- 
> 2.34.1
> 


More information about the Intel-xe mailing list