mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-18 11:33:36 -04:00
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 <Prike.Liang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user