On 9/28/26 20:57, Sunil Khatri wrote:
> Set vm_manager.spm_vmid to the top GFXHUB VMID so the SPM reservation
> path hands out a fixed, isolated VMID on gfx7 instead of borrowing
> one from the graphics pool. The reserved VMID is excluded from the MES
> user-queue mask and the KFD compute pool by the shared reserved-VMID
> infrastructure.
> 
> Signed-off-by: Sunil Khatri <[email protected]>
> ---
>  drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c 
> b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> index c95e097241bf8..89e7d19203183 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
> @@ -1007,6 +1007,10 @@ static int gmc_v7_0_sw_init(struct amdgpu_ip_block 
> *ip_block)
>        * amdkfd will use VMIDs 8-15
>        */
>       adev->vm_manager.first_kfd_vmid = 8;
> +
> +     /* Reserve the last VMID for SPM */
> +     adev->vm_manager.spm_vmid = AMDGPU_NUM_VMID - 1;
> +

Instead of this mess we should nuke first_kfd_vmid and let 
amdgpu_vmid_mgr_set_vmid_mask set masks for both kernel queues and user queues.

Regards,
Christian.

>       amdgpu_vmid_mgr_set_vmid_mask(adev,
>                                     GENMASK(adev->vm_manager.first_kfd_vmid - 
> 1, 1),
>                                     false);

Reply via email to