AMD General

Series is

Reviewed-by: Kent Russell <[email protected]>



> -----Original Message-----
> From: Alex Deucher <[email protected]>
> Sent: June 15, 2026 5:17 PM
> To: [email protected]; Russell, Kent <[email protected]>
> Cc: Deucher, Alexander <[email protected]>
> Subject: [PATCH 9/9] drm/amdgpu/gmc9: make all vmids available to KFD if KQs
> are disabled
>
> If the user has disabled kernel queues, then make all vmids
> available to HWS.
>
> Signed-off-by: Alex Deucher <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 16 ++++++++++++----
>  1 file changed, 12 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> index 8a5c44810ba1e..5166055c6692c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
> @@ -2025,11 +2025,19 @@ static int gmc_v9_0_sw_init(struct
> amdgpu_ip_block *ip_block)
>        * The first KFD VMID is 8 for GPUs with graphics, 3 for
>        * compute-only GPUs. On compute-only GPUs that leaves 2 VMIDs
>        * for video processing.
> +      *
> +      * If kernel queues are disabled, allow KFD to use all vmids.
>        */
> -     adev->vm_manager.first_kfd_vmid =
> -             (amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 1)
> ||
> -              amdgpu_ip_version(adev, GC_HWIP, 0) == IP_VERSION(9, 4, 2)
> ||
> -              amdgpu_is_multi_aid(adev)) ?
> +     if (adev->gfx.disable_kq &&
> +         adev->jpeg.disable_kq &&
> +         adev->vcn.disable_kq &&
> +         adev->sdma.no_user_submission)
> +             adev->vm_manager.first_kfd_vmid = 1;
> +     else
> +             adev->vm_manager.first_kfd_vmid =
> +                     (amdgpu_ip_version(adev, GC_HWIP, 0) ==
> IP_VERSION(9, 4, 1) ||
> +                      amdgpu_ip_version(adev, GC_HWIP, 0) ==
> IP_VERSION(9, 4, 2) ||
> +                      amdgpu_is_multi_aid(adev)) ?
>                       3 :
>                       8;
>
> --
> 2.54.0

Reply via email to