Call amdgpu_vm_update_fault_cache on GMC v6 similarly to how we
do in GMC v7-v8 so that VM fault info can be used later by
userspace for debugging.

Signed-off-by: Timur Kristóf <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c 
b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
index f6715648b08a..bc6a74903f4e 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
@@ -1077,6 +1077,10 @@ static int gmc_v6_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_v6_0_set_fault_enable_default(adev, false);
 
-- 
2.51.1

Reply via email to