drm/amdgpu: only print meaningful VM faults
Port of radeon commit 9b7d786b90
.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
2392eec65c
commit
3e4e380564
|
@ -1262,6 +1262,12 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
|
||||||
addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR);
|
addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR);
|
||||||
status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS);
|
status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS);
|
||||||
mc_client = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
|
mc_client = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
|
||||||
|
/* reset addr and status */
|
||||||
|
WREG32_P(mmVM_CONTEXT1_CNTL2, 1, ~1);
|
||||||
|
|
||||||
|
if (!addr && !status)
|
||||||
|
return 0;
|
||||||
|
|
||||||
dev_err(adev->dev, "GPU fault detected: %d 0x%08x\n",
|
dev_err(adev->dev, "GPU fault detected: %d 0x%08x\n",
|
||||||
entry->src_id, entry->src_data);
|
entry->src_id, entry->src_data);
|
||||||
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
|
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
|
||||||
|
@ -1269,8 +1275,6 @@ static int gmc_v7_0_process_interrupt(struct amdgpu_device *adev,
|
||||||
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
|
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
|
||||||
status);
|
status);
|
||||||
gmc_v7_0_vm_decode_fault(adev, status, addr, mc_client);
|
gmc_v7_0_vm_decode_fault(adev, status, addr, mc_client);
|
||||||
/* reset addr and status */
|
|
||||||
WREG32_P(mmVM_CONTEXT1_CNTL2, 1, ~1);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1262,6 +1262,12 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
|
||||||
addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR);
|
addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR);
|
||||||
status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS);
|
status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS);
|
||||||
mc_client = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
|
mc_client = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);
|
||||||
|
/* reset addr and status */
|
||||||
|
WREG32_P(mmVM_CONTEXT1_CNTL2, 1, ~1);
|
||||||
|
|
||||||
|
if (!addr && !status)
|
||||||
|
return 0;
|
||||||
|
|
||||||
dev_err(adev->dev, "GPU fault detected: %d 0x%08x\n",
|
dev_err(adev->dev, "GPU fault detected: %d 0x%08x\n",
|
||||||
entry->src_id, entry->src_data);
|
entry->src_id, entry->src_data);
|
||||||
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
|
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_ADDR 0x%08X\n",
|
||||||
|
@ -1269,8 +1275,6 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
|
||||||
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
|
dev_err(adev->dev, " VM_CONTEXT1_PROTECTION_FAULT_STATUS 0x%08X\n",
|
||||||
status);
|
status);
|
||||||
gmc_v8_0_vm_decode_fault(adev, status, addr, mc_client);
|
gmc_v8_0_vm_decode_fault(adev, status, addr, mc_client);
|
||||||
/* reset addr and status */
|
|
||||||
WREG32_P(mmVM_CONTEXT1_CNTL2, 1, ~1);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue