drm/amdgpu/userq: add a warning if fw does not support userqueues
Subsystems (2)
PATCH 1/1 drm/amdgpu/userq: add a warning if fw does not support userqueues
Creating a queue could fail due to various reasons and returning -EINVAL does not suffice in case where fw does not support the uq's
It's better to add a one time log that saves unnecessary debug effort.
Signed-off-by Sunil Khatri <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +18 -0
@@ -659,6 +659,24 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args) uq_funcs = adev->userq_funcs[args->in.ip_type];if (!uq_funcs) { +switch (args->in.ip_type) { +case AMDGPU_HW_IP_GFX : +case AMDGPU_HW_IP_COMPUTE : +dev_warn_once (adev->dev, +"Usermode queues for GFX/COMPUTE is not supported by the fw " +"on this ASIC (me: %u, pfp: %u, mec: %u, mes: %u)\n" , + adev->gfx.me_fw_version, adev->gfx.pfp_fw_version, + adev->gfx.mec_fw_version, adev->mes.fw_version[0 ]); +break ; +case AMDGPU_HW_IP_DMA : +dev_warn_once (adev->dev, +"Usermode queues for SDMA is not supported by the fw " +"on this ASIC (sdma: %u)\n" , + adev->sdma.instance[0 ].fw_version); +break ; +default : +break ; + } r = -EINVAL ; goto err_pm_runtime; }
Signature · 1 line
2.34.1
Quoted 7 lines · Sunil Khatri
Creating a queue could fail due to various reasons and returning
-EINVALdoes not suffice in case where fw does not support the uq'sIt's better to add a one time log that saves unnecessary debug effort.
Signed-off-by Sunil Khatri <[email protected]>
Acked-by Alex Deucher <[email protected]>
Quoted 36 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c +18
-1@@ -659,6 +659,24 @@ amdgpu_userq_create(struct drm_file *filp, union drm_amdgpu_userq *args) uq_funcs = adev->userq_funcs[args->in.ip_type];if (!uq_funcs) { +switch (args->in.ip_type) { +case AMDGPU_HW_IP_GFX : +case AMDGPU_HW_IP_COMPUTE : +dev_warn_once (adev->dev, +"Usermode queues for GFX/COMPUTE is not supported by the fw " +"on this ASIC (me: %u, pfp: %u, mec: %u, mes: %u)\n" , + adev->gfx.me_fw_version, adev->gfx.pfp_fw_version, + adev->gfx.mec_fw_version, adev->mes.fw_version[0 ]); +break ; +case AMDGPU_HW_IP_DMA : +dev_warn_once (adev->dev, +"Usermode queues for SDMA is not supported by the fw " +"on this ASIC (sdma: %u)\n" , + adev->sdma.instance[0 ].fw_version); +break ; +default : +break ; + } r = -EINVAL ; goto err_pm_runtime; } --2.34.1