Set vm_manager.spm_vmid to the top GFXHUB VMID so the SPM reservation
path hands out a fixed, isolated VMID on gfx11 instead of borrowing
one from the graphics pool.

Signed-off-by: Sunil Khatri <[email protected]>
Reviewed-by: Christian König <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index 301ffb89c9672..709c3d1b99980 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -856,6 +856,10 @@ static int gmc_v11_0_sw_init(struct amdgpu_ip_block 
*ip_block)
         * amdkfd/MES user queues will use VMIDs 8-15
         */
        last_kq_vmid = adev->gfx.disable_kq ? 0 : 7;
+
+       /* Reserve the last VMID for SPM */
+       adev->vm_manager.spm_vmid = AMDGPU_NUM_VMID - 1;
+
        amdgpu_vmid_mgr_set_vmid_mask(adev, GENMASK(last_kq_vmid, 1),
                                      GENMASK(AMDGPU_NUM_VMID - 1, 1));
 
-- 
2.34.1

Reply via email to