aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2025-03-24 20:26:00 +0000
committerAlex Deucher <[email protected]>2025-04-08 20:48:22 +0000
commit1af688126361bc881b134b9d25738e22dd457f30 (patch)
tree087f069d092cad33ced8bba9174622e0bfc27cd1 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
parentdrm/amdgpu/gfx12: split userq setup to a separate switch (diff)
downloadkernel-1af688126361bc881b134b9d25738e22dd457f30.tar.gz
kernel-1af688126361bc881b134b9d25738e22dd457f30.zip
drm/amdgpu: add UAPI to query if user queues are supported
Add an INFO query to check if user queues are supported. v2: switch to a mask of IPs (Marek) v3: move to drm_amdgpu_info_device (Marek) Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Sunil Khatri <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
index f8370da08038..b64a21773230 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c
@@ -999,6 +999,13 @@ out:
}
}
+ if (adev->userq_funcs[AMDGPU_HW_IP_GFX])
+ dev_info->userq_ip_mask |= (1 << AMDGPU_HW_IP_GFX);
+ if (adev->userq_funcs[AMDGPU_HW_IP_COMPUTE])
+ dev_info->userq_ip_mask |= (1 << AMDGPU_HW_IP_COMPUTE);
+ if (adev->userq_funcs[AMDGPU_HW_IP_DMA])
+ dev_info->userq_ip_mask |= (1 << AMDGPU_HW_IP_DMA);
+
ret = copy_to_user(out, dev_info,
min((size_t)size, sizeof(*dev_info))) ? -EFAULT : 0;
kfree(dev_info);