Module: Mesa
Branch: main
Commit: 7beddd4f5c0022cee6c172afc4428d332ee6347d
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=7beddd4f5c0022cee6c172afc4428d332ee6347d

Author: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Date:   Mon Oct 23 19:04:41 2023 +0200

radv: use the GPUVM fault protection status helper

To print more useful information when a fault happens.

Signed-off-by: Samuel Pitoiset <samuel.pitoi...@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25855>

---

 src/amd/vulkan/radv_debug.c  | 1 +
 src/amd/vulkan/radv_device.c | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c
index de4bf0af68d..bec016d6985 100644
--- a/src/amd/vulkan/radv_debug.c
+++ b/src/amd/vulkan/radv_debug.c
@@ -811,6 +811,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, const struct 
radv_winsys_submit_i
       if (f) {
          fprintf(f, "VM fault report.\n\n");
          fprintf(f, "Failing VM page: 0x%08" PRIx64 "\n", fault_info.addr);
+         ac_print_gpuvm_fault_status(f, 
device->physical_device->rad_info.gfx_level, fault_info.status);
          fclose(f);
       }
    }
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 4aa4b930c82..73783403f5b 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -82,6 +82,8 @@ typedef void *drmDevicePtr;
 #include "ac_llvm_util.h"
 #endif
 
+#include "ac_debug.h"
+
 static bool
 radv_spm_trace_enabled(struct radv_instance *instance)
 {
@@ -607,6 +609,7 @@ radv_report_gpuvm_fault(struct radv_device *device)
       return;
 
    fprintf(stderr, "radv: GPUVM fault detected at address 0x%08" PRIx64 ".\n", 
fault_info.addr);
+   ac_print_gpuvm_fault_status(stderr, 
device->physical_device->rad_info.gfx_level, fault_info.status);
 }
 
 static VkResult

Reply via email to