All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: correct vmid_src -> vmhub_index mapping
@ 2023-07-26 11:24 Lang Yu
  2023-07-26 12:02 ` Zhang, Hawking
  0 siblings, 1 reply; 4+ messages in thread
From: Lang Yu @ 2023-07-26 11:24 UTC (permalink / raw)
  To: amd-gfx; +Cc: Alex Deucher, Yifan Zhang, Lang Yu, Hawking Zhang

Align with new vmhub definition.
vmid_src 0 -> AMDGPU_GFXHUB(0).
vmid_src 1 -> AMDGPU_MMHUB0(0).

Signed-off-by: Lang Yu <Lang.Yu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 3 ++-
 drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
index 6b430e10d38e..9c4e084da99a 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -102,9 +102,10 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev,
 				       struct amdgpu_irq_src *source,
 				       struct amdgpu_iv_entry *entry)
 {
+	struct amdgpu_vmhub *hub =
+		&adev->vmhub[entry->vmid_src ? AMDGPU_MMHUB0(0) : AMDGPU_GFXHUB(0)];
 	bool retry_fault = !!(entry->src_data[1] & 0x80);
 	bool write_fault = !!(entry->src_data[1] & 0x20);
-	struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src];
 	struct amdgpu_task_info task_info;
 	uint32_t status = 0;
 	u64 addr;
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index 604522f70d03..47f5ced12ba2 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -99,7 +99,8 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device *adev,
 				       struct amdgpu_irq_src *source,
 				       struct amdgpu_iv_entry *entry)
 {
-	struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src];
+	struct amdgpu_vmhub *hub =
+		&adev->vmhub[entry->vmid_src ? AMDGPU_MMHUB0(0) : AMDGPU_GFXHUB(0)];
 	uint32_t status = 0;
 	u64 addr;
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-07-27  2:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-26 11:24 [PATCH] drm/amdgpu: correct vmid_src -> vmhub_index mapping Lang Yu
2023-07-26 12:02 ` Zhang, Hawking
2023-07-27  2:01   ` Chai, Thomas
2023-07-27  2:47     ` Lang Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.