Skip to contentSkip to conversation

drm/amdgpu: exclude npa_vmid from the userq vmids too

PATCH In review Sunil Khatri 2 participants 2 messages Oct 5 – Oct 6

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: exclude npa_vmid from the userq vmids too

On IP_VERSION(12, 1, 0), we are excluding vmid 15 from the available vmids in kernel queues for mmhub but its not exluded from the userqueues mmhub vmids and it is a problem.

---
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +3 -0
index ab707b1c7867c..fcc1d580fa946 100644
@@ -1014,6 +1014,9 @@ static int gmc_v12_0_sw_init(struct amdgpu_ip_block *ip_block)
 
 	amdgpu_vm_manager_init(adev);
 
+	if (adev->vm_manager.npa_vmid)
+		adev->vm_manager.vmid_uq_mask_mmhub &= ~BIT(adev->vm_manager.npa_vmid);
+
 	r = amdgpu_gmc_ras_sw_init(adev);
 	if (r)
 		return r;
Signature · 1 line
2.34.1
maintainer Reviewed-by on v1 1/1
#1 lore raw

Public

Quoted 9 lines

-----Original Message-----
From: Sunil Khatri <[email protected]>
Sent: Monday, October 5, 2026 8:56 AM
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Joshi, Mukul <[email protected]>
Cc: [email protected]; Khatri, Sunil <[email protected]>
Subject: [PATCH v1] drm/amdgpu: exclude npa_vmid from the userq vmids too

Quoted 4 lines

On IP_VERSION(12, 1, 0), we are excluding vmid 15 from the available vmids in kernel queues for mmhub but its not exluded from the userqueues mmhub vmids and it is a problem.

In practice it's not a problem because all of the queues MES manages are connected to GFXHUB so we wouldn't get a conflict, but still worth fixing.

Quoted 24 lines
---
 drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c +4 -1
index ab707b1c7867c..fcc1d580fa946 100644
@@ -1014,6 +1014,9 @@ static int gmc_v12_0_sw_init(struct
 amdgpu_ip_block *ip_block)
 
      amdgpu_vm_manager_init(adev);
 
+     if (adev->vm_manager.npa_vmid)
+             adev->vm_manager.vmid_uq_mask_mmhub &=
+~BIT(adev->vm_manager.npa_vmid);
+
      r = amdgpu_gmc_ras_sw_init(adev);
      if (r)
              return r;
--

2.34.1