[PATCH 2/2] drm/amdgpu: fix incorrect vmhub index
Zhang, Hawking
Hawking.Zhang at amd.com
Thu Jul 20 05:44:18 UTC 2023
[AMD Official Use Only - General]
Please apply the same change to gmc_v10_0_process_interrupt.
Might be better to check the client_id == VMC to decide vmhub.
Regards,
Hawking
-----Original Message-----
From: Chai, Thomas <YiPeng.Chai at amd.com>
Sent: Thursday, July 20, 2023 13:42
To: amd-gfx at lists.freedesktop.org
Cc: Chai, Thomas <YiPeng.Chai at amd.com>; Zhang, Hawking <Hawking.Zhang at amd.com>; Zhou1, Tao <Tao.Zhou1 at amd.com>; Li, Candice <Candice.Li at amd.com>; Yang, Stanley <Stanley.Yang at amd.com>; Chai, Thomas <YiPeng.Chai at amd.com>
Subject: [PATCH 2/2] drm/amdgpu: fix incorrect vmhub index
Fix incorrect vmhub index.
Signed-off-by: YiPeng Chai <YiPeng.Chai at amd.com>
---
drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index d04fc0f19a29..c0b588e5d6aa 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -97,10 +97,13 @@ 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;
uint32_t status = 0;
u64 addr;
+ hub = entry->vmid_src ?
+ &adev->vmhub[AMDGPU_MMHUB0(0)] : &adev->vmhub[AMDGPU_GFXHUB(0)];
+
addr = (u64)entry->src_data[0] << 12;
addr |= ((u64)entry->src_data[1] & 0xf) << 44;
--
2.34.1
More information about the amd-gfx
mailing list