[PATCH 01/13] drm/amdgpu: convert userq UAPI _pad to flags

Khatri, Sunil sukhatri at amd.com
Fri Apr 11 16:49:25 UTC 2025


Reviewed-by: Sunil Khatri <sunil.khatri at amd.com>

On 4/11/2025 12:23 AM, Alex Deucher wrote:
> Reuse the _pad field for flags.
>
> Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
> ---
>   drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c | 4 ++--
>   include/uapi/drm/amdgpu_drm.h                 | 5 ++++-
>   2 files changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c
> index 50317fbd40e0e..57a4ef64e0b8b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c
> @@ -377,7 +377,7 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
>   
>   	switch (args->in.op) {
>   	case AMDGPU_USERQ_OP_CREATE:
> -		if (args->in._pad)
> +		if (args->in.flags)
>   			return -EINVAL;
>   		r = amdgpu_userqueue_create(filp, args);
>   		if (r)
> @@ -388,7 +388,7 @@ int amdgpu_userq_ioctl(struct drm_device *dev, void *data,
>   		if (args->in.ip_type ||
>   		    args->in.doorbell_handle ||
>   		    args->in.doorbell_offset ||
> -		    args->in._pad ||
> +		    args->in.flags ||
>   		    args->in.queue_va ||
>   		    args->in.queue_size ||
>   		    args->in.rptr_va ||
> diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
> index ef97c0d78b8a0..1a451907184cc 100644
> --- a/include/uapi/drm/amdgpu_drm.h
> +++ b/include/uapi/drm/amdgpu_drm.h
> @@ -355,7 +355,10 @@ struct drm_amdgpu_userq_in {
>   	 * and doorbell_offset in the doorbell bo.
>   	 */
>   	__u32   doorbell_offset;
> -	__u32 _pad;
> +	/**
> +	 * @flags: flags used for queue parameters
> +	 */
> +	__u32 flags;
>   	/**
>   	 * @queue_va: Virtual address of the GPU memory which holds the queue
>   	 * object. The queue holds the workload packets.


More information about the amd-gfx mailing list