summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_debug.c
diff options
context:
space:
mode:
authorBas Nieuwenhuizen <[email protected]>2017-09-07 22:12:50 +0200
committerBas Nieuwenhuizen <[email protected]>2017-09-09 11:50:30 +0200
commite3c942515884fa3c081b29ddf864f8756baaf2d2 (patch)
tree0ac4476b521f98ef3d83deb93956ca78b5e42672 /src/amd/vulkan/radv_debug.c
parent57a341b0a94d37e2aee5380703d171c422d8550e (diff)
radv: Actually check for vm faults.
The code can check for vm faults having happened. If we only do it on a hang we don't know when the faults happened. This changes the behavior to when the first VM faults is found, even without a hang. Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_debug.c')
-rw-r--r--src/amd/vulkan/radv_debug.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/amd/vulkan/radv_debug.c b/src/amd/vulkan/radv_debug.c
index a1c0a619979..d52ba5d86d8 100644
--- a/src/amd/vulkan/radv_debug.c
+++ b/src/amd/vulkan/radv_debug.c
@@ -88,11 +88,15 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_winsys_cs *cs)
struct radv_device *device = queue->device;
uint64_t addr;
- if (!radv_gpu_hang_occured(queue))
+ bool hang_occurred = radv_gpu_hang_occured(queue);
+ bool vm_fault_occurred = false;
+ if (queue->device->instance->debug_flags & RADV_DEBUG_VM_FAULTS)
+ vm_fault_occurred = ac_vm_fault_occured(device->physical_device->rad_info.chip_class,
+ &device->dmesg_timestamp, &addr);
+ if (!hang_occurred && !vm_fault_occurred)
return;
- if (ac_vm_fault_occured(device->physical_device->rad_info.chip_class,
- &device->dmesg_timestamp, &addr)) {
+ if (vm_fault_occurred) {
fprintf(stderr, "VM fault report.\n\n");
fprintf(stderr, "Failing VM page: 0x%08"PRIx64"\n\n", addr);
}