From 070bc883d34d5a687b800f4615d82eda3f0eb7bb Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 18 Feb 2020 08:05:11 -0500 Subject: [PATCH] panfrost: Print synced traces to stderr To match the existing behaviour. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/gallium/drivers/panfrost/pan_screen.c | 2 +- src/panfrost/pandecode/common.c | 8 ++++++-- src/panfrost/pandecode/public.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c index 7cd90107382..2d6fe3377d2 100644 --- a/src/gallium/drivers/panfrost/pan_screen.c +++ b/src/gallium/drivers/panfrost/pan_screen.c @@ -775,7 +775,7 @@ panfrost_create_screen(int fd, struct renderonly *ro) list_inithead(&screen->bo_cache.buckets[i]); if (pan_debug & (PAN_DBG_TRACE | PAN_DBG_SYNC)) - pandecode_initialize(); + pandecode_initialize(!(pan_debug & PAN_DBG_TRACE)); screen->base.destroy = panfrost_destroy_screen; diff --git a/src/panfrost/pandecode/common.c b/src/panfrost/pandecode/common.c index f4db65126b4..2f2249efe95 100644 --- a/src/panfrost/pandecode/common.c +++ b/src/panfrost/pandecode/common.c @@ -150,10 +150,14 @@ pandecode_dump_file_close(void) } void -pandecode_initialize(void) +pandecode_initialize(bool to_stderr) { list_inithead(&mmaps.node); - pandecode_dump_file_open(); + + if (to_stderr) + pandecode_dump_stream = stderr; + else + pandecode_dump_file_open(); } void diff --git a/src/panfrost/pandecode/public.h b/src/panfrost/pandecode/public.h index cc8a100a9aa..32e043d52c8 100644 --- a/src/panfrost/pandecode/public.h +++ b/src/panfrost/pandecode/public.h @@ -42,7 +42,7 @@ * included in-tree. */ -void pandecode_initialize(void); +void pandecode_initialize(bool to_stderr); void pandecode_next_frame(void); -- 2.30.2