radv: use the GPUVM fault protection status helper

To print more useful information when a fault happens.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25855>
This commit is contained in:
Samuel Pitoiset 2023-10-23 19:04:41 +02:00 committed by Marge Bot
parent e18c4bca31
commit 7beddd4f5c
2 changed files with 4 additions and 0 deletions

View file

@ -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);
}
}

View file

@ -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