radv: add RADV_DEBUG=noumr to disable UMR logs during GPU hang detection
Sometimes UMR logs can't be dumped and you would get permission denied, even if the UMR binary has the setuid bit enabled. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7706>
This commit is contained in:
parent
a61a398f7e
commit
4ffa6acb0d
|
@ -589,6 +589,8 @@ RADV driver environment variables
|
|||
disable out-of-order rasterization
|
||||
``nothreadllvm``
|
||||
disable LLVM threaded compilation
|
||||
``noumr``
|
||||
disable UMR dumps during GPU hang detection (only with RADV_DEBUG=hang)
|
||||
``preoptir``
|
||||
dump LLVM IR before any optimizations
|
||||
``shaders``
|
||||
|
|
|
@ -473,7 +473,8 @@ radv_dump_queue_state(struct radv_queue *queue, FILE *f)
|
|||
pipeline = radv_get_saved_pipeline(queue->device, ring);
|
||||
if (pipeline) {
|
||||
radv_dump_shaders(pipeline, pipeline->active_stages, f);
|
||||
radv_dump_annotated_shaders(pipeline, pipeline->active_stages, f);
|
||||
if (!(queue->device->instance->debug_flags & RADV_DEBUG_NO_UMR))
|
||||
radv_dump_annotated_shaders(pipeline, pipeline->active_stages, f);
|
||||
radv_dump_descriptors(queue->device, f);
|
||||
}
|
||||
}
|
||||
|
@ -670,20 +671,22 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
|||
fclose(f);
|
||||
}
|
||||
|
||||
/* Dump UMR ring. */
|
||||
snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, "umr_ring.log");
|
||||
f = fopen(dump_path, "w+");
|
||||
if (f) {
|
||||
radv_dump_umr_ring(queue, f);
|
||||
fclose(f);
|
||||
}
|
||||
if (!(device->instance->debug_flags & RADV_DEBUG_NO_UMR)) {
|
||||
/* Dump UMR ring. */
|
||||
snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, "umr_ring.log");
|
||||
f = fopen(dump_path, "w+");
|
||||
if (f) {
|
||||
radv_dump_umr_ring(queue, f);
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
/* Dump UMR waves. */
|
||||
snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, "umr_waves.log");
|
||||
f = fopen(dump_path, "w+");
|
||||
if (f) {
|
||||
radv_dump_umr_waves(queue, f);
|
||||
fclose(f);
|
||||
/* Dump UMR waves. */
|
||||
snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, "umr_waves.log");
|
||||
f = fopen(dump_path, "w+");
|
||||
if (f) {
|
||||
radv_dump_umr_waves(queue, f);
|
||||
fclose(f);
|
||||
}
|
||||
}
|
||||
|
||||
/* Dump debug registers. */
|
||||
|
|
|
@ -59,6 +59,7 @@ enum {
|
|||
RADV_DEBUG_FORCE_COMPRESS = 1 << 28,
|
||||
RADV_DEBUG_HANG = 1 << 29,
|
||||
RADV_DEBUG_IMG = 1 << 30,
|
||||
RADV_DEBUG_NO_UMR = 1 << 31,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
|
|
@ -553,6 +553,7 @@ static const struct debug_control radv_debug_options[] = {
|
|||
{"forcecompress", RADV_DEBUG_FORCE_COMPRESS},
|
||||
{"hang", RADV_DEBUG_HANG},
|
||||
{"img", RADV_DEBUG_IMG},
|
||||
{"noumr", RADV_DEBUG_NO_UMR},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue