diff options
| author | Alex Deucher <[email protected]> | 2025-04-16 20:43:52 +0000 |
|---|---|---|
| committer | Alex Deucher <[email protected]> | 2025-04-22 12:51:45 +0000 |
| commit | 11772eb73bb75558b530162fc0eb669e5bbc1d19 (patch) | |
| tree | 68b756e6b6f29c9b89f68d9644de6bc2fd687da5 /drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | |
| parent | drm/amdgpu: Add queue id support to the user queue wait IOCTL (diff) | |
| download | kernel-11772eb73bb75558b530162fc0eb669e5bbc1d19.tar.gz kernel-11772eb73bb75558b530162fc0eb669e5bbc1d19.zip | |
drm/amdgpu/userq: add a helper to check which IPs are enabled
Add a helper to get a mask of IPs which support user queues.
Use this in the INFO IOCTL to get the IP mask to replace
the current code.
Reviewed-by: Prike Liang <[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.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index 3d319687c1c9..151366ecc0af 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c @@ -1009,12 +1009,7 @@ 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); + dev_info->userq_ip_mask = amdgpu_userqueue_get_supported_ip_mask(adev); ret = copy_to_user(out, dev_info, min((size_t)size, sizeof(*dev_info))) ? -EFAULT : 0; |
