On Mon, Aug 31, 2026 at 12:17 PM Sunil Khatri <[email protected]> wrote:
>
> 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]>

Acked-by: Alex Deucher <[email protected]>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c | 18 ++++++++++++++++++
>  1 file changed, 18 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c 
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> index 4c6e080671a7..f16af852725a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_userq.c
> @@ -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
>

Reply via email to