Set vm_manager.spm_vmid to the top GFXHUB VMID so the SPM reservation path hands out a fixed, isolated VMID on gfx12 instead of borrowing one from the graphics pool. This also covers gfx12.1, whose VMID setup is handled in this file.
Signed-off-by: Sunil Khatri <[email protected]> Reviewed-by: Christian König <[email protected]> --- drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c index e4a74cd6574f4..cd276a138e101 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c @@ -1006,6 +1006,9 @@ static int gmc_v12_0_sw_init(struct amdgpu_ip_block *ip_block) if (adev->gfx.disable_kq) last_kq_vmid = 0; + /* 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
