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

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

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 55d286275466d..49f593fe2a876 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -869,6 +869,10 @@ static int gmc_v10_0_sw_init(struct amdgpu_ip_block 
*ip_block)
         * amdgpu graphics/compute kernel queues will use VMIDs 1-7
         * amdkfd/MES user queues will use VMIDs 8-15
         */
+
+       /* Reserve the last VMID for SPM */
+       adev->vm_manager.spm_vmid = AMDGPU_NUM_VMID - 1;
+
        amdgpu_vmid_mgr_set_vmid_mask(adev, GENMASK(7, 1),
                                      GENMASK(AMDGPU_NUM_VMID - 1, 1));
 
-- 
2.34.1

Reply via email to