From f7da4eade4e83c0784ddbd8e60033b0a9bf3b6d3 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Thu, 7 Jul 2022 11:51:49 +1200 Subject: [PATCH] pan/decode: fflush buffers after dumping and before aborts Otherwise trace files or other files being written (dEQP TestResults?) might be truncated. Reviewed-by: Alyssa Rosenzweig Part-of: --- src/panfrost/lib/genxml/decode.c | 1 + src/panfrost/lib/genxml/decode_common.c | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/panfrost/lib/genxml/decode.c b/src/panfrost/lib/genxml/decode.c index 03a2d3a93fc..ffa5952323c 100644 --- a/src/panfrost/lib/genxml/decode.c +++ b/src/panfrost/lib/genxml/decode.c @@ -1413,6 +1413,7 @@ GENX(pandecode_abort_on_fault)(mali_ptr jc_gpu_va) /* Ensure the job is marked COMPLETE */ if (h.exception_status != 0x1) { fprintf(stderr, "Incomplete job or timeout\n"); + fflush(NULL); abort(); } } while ((jc_gpu_va = next_job)); diff --git a/src/panfrost/lib/genxml/decode_common.c b/src/panfrost/lib/genxml/decode_common.c index d9ba65884ca..7857eaa7fb8 100644 --- a/src/panfrost/lib/genxml/decode_common.c +++ b/src/panfrost/lib/genxml/decode_common.c @@ -262,6 +262,8 @@ pandecode_dump_mappings(void) pan_hexdump(pandecode_dump_stream, it->addr, it->length, false); fprintf(pandecode_dump_stream, "\n"); } + + fflush(pandecode_dump_stream); } void pandecode_abort_on_fault_v4(mali_ptr jc_gpu_va);