summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2025-02-26 16:54:27 -0500
committerAlex Deucher <alexander.deucher@amd.com>2025-04-21 10:56:18 -0400
commitfced8e7d2ddeba7f41b19e065f8c02a9abf9ac00 (patch)
tree635ad686db1a1babf4837a56bdcc51a9e19757c1
parent6027cbee190049629d3028789659e0763562e21e (diff)
drm/amdgpu: convert userq UAPI _pad to flags
Reuse the _pad field for flags. Reviewed-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Jesse.Zhang <Jesse.zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c4
-rw-r--r--include/uapi/drm/amdgpu_drm.h5
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 e944d05685dd..9a7ac85ff01c 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userqueue.c
@@ -399,7 +399,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)
@@ -410,7 +410,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 ef97c0d78b8a..1a451907184c 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.