panfrost: Print synced traces to stderr
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 18 Feb 2020 13:05:11 +0000 (08:05 -0500)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 18 Feb 2020 13:45:18 +0000 (08:45 -0500)
To match the existing behaviour.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>

src/gallium/drivers/panfrost/pan_screen.c
src/panfrost/pandecode/common.c
src/panfrost/pandecode/public.h

index 7cd90107382ef320f32a5bb4ed9cd8f0e70f880b..2d6fe3377d24990a8fe586ae0637df5348b1d9ec 100644 (file)
@@ -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;
 
index f4db65126b47dfafce6626744e659b7d54c13044..2f2249efe955e82e11c32597988ba4288eb6d2fc 100644 (file)
@@ -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
index cc8a100a9aa38306c99edc8558d4277753b0a790..32e043d52c8bff6e18f80c530777506f0193cbf1 100644 (file)
@@ -42,7 +42,7 @@
  * included in-tree.
  */
 
-void pandecode_initialize(void);
+void pandecode_initialize(bool to_stderr);
 
 void pandecode_next_frame(void);