Skip to content

Commit 6f38bdb

Browse files
Lang Yualexdeucher
authored andcommitted
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 <[email protected]> Reviewed-by: Hawking Zhang <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 3dc6d83 commit 6f38bdb

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,11 @@ static int gmc_v10_0_process_interrupt(struct amdgpu_device *adev,
102102
struct amdgpu_irq_src *source,
103103
struct amdgpu_iv_entry *entry)
104104
{
105+
uint32_t vmhub_index = entry->client_id == SOC15_IH_CLIENTID_VMC ?
106+
AMDGPU_MMHUB0(0) : AMDGPU_GFXHUB(0);
107+
struct amdgpu_vmhub *hub = &adev->vmhub[vmhub_index];
105108
bool retry_fault = !!(entry->src_data[1] & 0x80);
106109
bool write_fault = !!(entry->src_data[1] & 0x20);
107-
struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src];
108110
struct amdgpu_task_info task_info;
109111
uint32_t status = 0;
110112
u64 addr;

drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device *adev,
9797
struct amdgpu_irq_src *source,
9898
struct amdgpu_iv_entry *entry)
9999
{
100-
struct amdgpu_vmhub *hub = &adev->vmhub[entry->vmid_src];
100+
uint32_t vmhub_index = entry->client_id == SOC21_IH_CLIENTID_VMC ?
101+
AMDGPU_MMHUB0(0) : AMDGPU_GFXHUB(0);
102+
struct amdgpu_vmhub *hub = &adev->vmhub[vmhub_index];
101103
uint32_t status = 0;
102104
u64 addr;
103105

0 commit comments

Comments
 (0)