Set vm_manager.spm_vmid to the top GFXHUB VMID so the SPM reservation path hands out a fixed, isolated VMID on gfx8 instead of borrowing one from the graphics pool.
Signed-off-by: Sunil Khatri <[email protected]> --- drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c index 3f9ec7427319d..15592027e7c0c 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c @@ -1123,6 +1123,10 @@ static int gmc_v8_0_sw_init(struct amdgpu_ip_block *ip_block) * amdkfd/MES user queues will use VMIDs 8-15 */ vmid_mask = GENMASK(7, 1); + + /* Reserve the last VMID for SPM */ + adev->vm_manager.spm_vmid = AMDGPU_NUM_VMID - 1; + amdgpu_vmid_mgr_set_vmid_mask(adev, vmid_mask, vmid_mask); amdgpu_vm_manager_init(adev); -- 2.34.1
