From 8249912d348a813ce9977888b953399054a2816e Mon Sep 17 00:00:00 2001 From: Yiwei Zhang Date: Mon, 6 Oct 2025 13:50:27 -0700 Subject: [PATCH] pan/genxml: improve pandecode_dump_file_open logging Makes the pandecode_dump_file_open debug and error logs friendly to Android. Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/genxml/decode_common.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/panfrost/genxml/decode_common.c b/src/panfrost/genxml/decode_common.c index 3c150c1da77..08e1e24a016 100644 --- a/src/panfrost/genxml/decode_common.c +++ b/src/panfrost/genxml/decode_common.c @@ -30,10 +30,11 @@ #include #include +#include "lib/pan_props.h" +#include "util/log.h" #include "util/macros.h" #include "util/u_debug.h" #include "util/u_hexdump.h" -#include "lib/pan_props.h" #include "decode.h" #include "compiler/bifrost/disassemble.h" @@ -261,12 +262,12 @@ pandecode_dump_file_open(struct pandecode_context *ctx) char buffer[1024]; snprintf(buffer, sizeof(buffer), "%s.ctx-%d.%04d", dump_file_base, ctx->id, ctx->dump_frame_count); - printf("pandecode: dump command stream to file %s\n", buffer); + mesa_logd("pandecode: dump command stream to file %s", buffer); ctx->dump_stream = fopen(buffer, "w"); - if (!ctx->dump_stream) - fprintf(stderr, - "pandecode: failed to open command stream log file %s\n", - buffer); + if (!ctx->dump_stream) { + mesa_loge("pandecode: failed to open command stream log file %s", + buffer); + } } }