summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2022-09-29 18:57:12 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-10-05 01:37:07 +0300
commit8dbf1ba867c23a581973207d6d1d15ed72e814a7 (patch)
tree4005de1ff16c0fd39ab24067c89a97c44334d76a /drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
parent2e8ef6a56129526a67b1058124be0839ab8f976a (diff)
downloadlinux-8dbf1ba867c23a581973207d6d1d15ed72e814a7.tar.xz
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: samuel.pitoiset@gmail.com Reviewed-by: Christian König <christian.koenig@amd.com> Acked-by: Guchun Chen <guchun.chen@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
index 07f50ca8d481..f4bb3886d1bc 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v11_0.c
@@ -119,6 +119,9 @@ static int gmc_v11_0_process_interrupt(struct amdgpu_device *adev,
status = RREG32(hub->vm_l2_pro_fault_status);
WREG32_P(hub->vm_l2_pro_fault_cntl, 1, ~1);
+
+ amdgpu_vm_update_fault_cache(adev, entry->pasid, addr, status,
+ entry->vmid_src ? AMDGPU_MMHUB0(0) : AMDGPU_GFXHUB(0));
}
if (printk_ratelimit()) {