radv: pass submit info to radv_check_gpu_hangs()
This will allow to dump preambles/postambles CS and eventually even more CS. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24191>
This commit is contained in:

committed by
Marge Bot

parent
9c95a74e5e
commit
df98dca7ad
@@ -697,7 +697,7 @@ radv_gpu_hang_occurred(struct radv_queue *queue, enum amd_ip_type ring)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
radv_check_gpu_hangs(struct radv_queue *queue, const struct radv_winsys_submit_info *submit_info)
|
||||||
{
|
{
|
||||||
struct radv_device *device = queue->device;
|
struct radv_device *device = queue->device;
|
||||||
enum amd_ip_type ring;
|
enum amd_ip_type ring;
|
||||||
@@ -741,7 +741,7 @@ radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs)
|
|||||||
snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, "trace.log");
|
snprintf(dump_path, sizeof(dump_path), "%s/%s", dump_dir, "trace.log");
|
||||||
f = fopen(dump_path, "w+");
|
f = fopen(dump_path, "w+");
|
||||||
if (f) {
|
if (f) {
|
||||||
radv_dump_trace(queue->device, cs, f);
|
radv_dump_trace(queue->device, submit_info->cs_array[0], f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -94,7 +94,7 @@ enum {
|
|||||||
bool radv_init_trace(struct radv_device *device);
|
bool radv_init_trace(struct radv_device *device);
|
||||||
void radv_finish_trace(struct radv_device *device);
|
void radv_finish_trace(struct radv_device *device);
|
||||||
|
|
||||||
void radv_check_gpu_hangs(struct radv_queue *queue, struct radeon_cmdbuf *cs);
|
void radv_check_gpu_hangs(struct radv_queue *queue, const struct radv_winsys_submit_info *submit_info);
|
||||||
|
|
||||||
void radv_print_spirv(const char *data, uint32_t size, FILE *fp);
|
void radv_print_spirv(const char *data, uint32_t size, FILE *fp);
|
||||||
|
|
||||||
|
@@ -1633,7 +1633,6 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi
|
|||||||
const bool last_submit = j + advance == cmd_buffer_count;
|
const bool last_submit = j + advance == cmd_buffer_count;
|
||||||
bool submit_ace = false;
|
bool submit_ace = false;
|
||||||
unsigned num_submitted_cs = 0;
|
unsigned num_submitted_cs = 0;
|
||||||
unsigned cs_idx = 0;
|
|
||||||
|
|
||||||
if (queue->device->trace_bo)
|
if (queue->device->trace_bo)
|
||||||
*queue->device->trace_id_ptr = 0;
|
*queue->device->trace_id_ptr = 0;
|
||||||
@@ -1662,7 +1661,6 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi
|
|||||||
cs_array[num_submitted_cs++] = cmd_buffer->cs;
|
cs_array[num_submitted_cs++] = cmd_buffer->cs;
|
||||||
|
|
||||||
chainable = can_chain_next ? cmd_buffer->cs : NULL;
|
chainable = can_chain_next ? cmd_buffer->cs : NULL;
|
||||||
cs_idx = num_submitted_cs - 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
submit.cs_count = num_submitted_cs;
|
submit.cs_count = num_submitted_cs;
|
||||||
@@ -1677,7 +1675,7 @@ radv_queue_submit_normal(struct radv_queue *queue, struct vk_queue_submit *submi
|
|||||||
goto fail;
|
goto fail;
|
||||||
|
|
||||||
if (queue->device->trace_bo) {
|
if (queue->device->trace_bo) {
|
||||||
radv_check_gpu_hangs(queue, cs_array[cs_idx]);
|
radv_check_gpu_hangs(queue, &submit);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (queue->device->tma_bo) {
|
if (queue->device->tma_bo) {
|
||||||
|
Reference in New Issue
Block a user