summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
diff options
context:
space:
mode:
authorLang Yu <Lang.Yu@amd.com>2023-07-26 19:04:25 +0800
committerAlex Deucher <alexander.deucher@amd.com>2023-07-27 15:05:31 -0400
commit6f38bdb86a056707b9ecb09e3b44adedc8e8d8a0 (patch)
treeb1b3c3b4c5352bf73c586b1398a9b4b35ca9bd09 /drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
parent3dc6d8352ea9e5508005ff487c8b931918b5eb74 (diff)
downloadlinux-stable-6f38bdb86a056707b9ecb09e3b44adedc8e8d8a0.tar.gz
linux-stable-6f38bdb86a056707b9ecb09e3b44adedc8e8d8a0.tar.bz2
linux-stable-6f38bdb86a056707b9ecb09e3b44adedc8e8d8a0.zip
drm/amdgpu: correct vmhub index in GMC v10/11
Align with new vmhub definition. v2: use client_id == VMC to decide vmhub(Hawking) Signed-off-by: Lang Yu <Lang.Yu@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c4
1 files changed, 3 insertions, 1 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..fa87a85e1017 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c
@@ -102,9 +102,11 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev,
struct amdgpu_irq_src *source,
struct amdgpu_iv_entry *entry)
{
+ uint32_t vmhub_index = entry->client_id == SOC15_IH_CLIENTID_VMC ?
+ AMDGPU_MMHUB0(0) : AMDGPU_GFXHUB(0);
+ struct amdgpu_vmhub *hub = &adev->vmhub[vmhub_index];
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;