aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2022-09-29 15:57:12 +0000
committerAlex Deucher <[email protected]>2023-10-04 22:37:07 +0000
commit8dbf1ba867c23a581973207d6d1d15ed72e814a7 (patch)
tree4005de1ff16c0fd39ab24067c89a97c44334d76a /drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
parentdrm/amdgpu: add cached GPU fault structure to vm struct (diff)
downloadkernel-8dbf1ba867c23a581973207d6d1d15ed72e814a7.tar.gz
kernel-8dbf1ba867c23a581973207d6d1d15ed72e814a7.zip
drm/amdgpu: cache gpuvm fault information for gmc7+
Cache the current fault info in the vm struct. This can be queried by userspace later to help debug UMDs. Cc: [email protected] Reviewed-by: Christian König <[email protected]> Acked-by: Guchun Chen <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
index 4126172feb7f..fa59749c2aef 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c
@@ -1436,6 +1436,9 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
if (!addr && !status)
return 0;
+ amdgpu_vm_update_fault_cache(adev, entry->pasid,
+ ((u64)addr) << AMDGPU_GPU_PAGE_SHIFT, status, AMDGPU_GFXHUB(0));
+
if (amdgpu_vm_fault_stop == AMDGPU_VM_FAULT_STOP_FIRST)
gmc_v8_0_set_fault_enable_default(adev, false);