Skip to content

Commit d56aaba

Browse files
Timur Kristófalexdeucher
authored andcommitted
drm/amdgpu/gmc6: Don't print MC client as it's unknown
The VM_CONTEXT1_PROTECTION_FAULT_MCCLIENT register doesn't exist on GMC v6 so we can't print the MC client as a string like we do on GMC v7-v8. However, we still print the mc_id from VM_CONTEXT1_PROTECTION_FAULT_STATUS. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent 488d9e7 commit d56aaba

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

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

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -610,23 +610,21 @@ static void gmc_v6_0_gart_disable(struct amdgpu_device *adev)
610610
}
611611

612612
static void gmc_v6_0_vm_decode_fault(struct amdgpu_device *adev,
613-
u32 status, u32 addr, u32 mc_client)
613+
u32 status, u32 addr)
614614
{
615615
u32 mc_id;
616616
u32 vmid = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS, VMID);
617617
u32 protections = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
618618
PROTECTIONS);
619-
char block[5] = { mc_client >> 24, (mc_client >> 16) & 0xff,
620-
(mc_client >> 8) & 0xff, mc_client & 0xff, 0 };
621619

622620
mc_id = REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
623621
MEMORY_CLIENT_ID);
624622

625-
dev_err(adev->dev, "VM fault (0x%02x, vmid %d) at page %u, %s from '%s' (0x%08x) (%d)\n",
623+
dev_err(adev->dev, "VM fault (0x%02x, vmid %d) at page %u, %s from %d\n",
626624
protections, vmid, addr,
627625
REG_GET_FIELD(status, VM_CONTEXT1_PROTECTION_FAULT_STATUS,
628626
MEMORY_CLIENT_RW) ?
629-
"write" : "read", block, mc_client, mc_id);
627+
"write" : "read", mc_id);
630628
}
631629

632630
static const u32 mc_cg_registers[] = {
@@ -1089,7 +1087,7 @@ static int gmc_v6_0_process_interrupt(struct amdgpu_device *adev,
10891087
addr);
10901088
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
10911089
status);
1092-
gmc_v6_0_vm_decode_fault(adev, status, addr, 0);
1090+
gmc_v6_0_vm_decode_fault(adev, status, addr);
10931091
}
10941092

10951093
return 0;

0 commit comments

Comments
 (0)