Mesa (master): panfrost: Print synced traces to stderr
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Feb 18 14:10:42 UTC 2020
Module: Mesa
Branch: master
Commit: 070bc883d34d5a687b800f4615d82eda3f0eb7bb
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=070bc883d34d5a687b800f4615d82eda3f0eb7bb
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Tue Feb 18 08:05:11 2020 -0500
panfrost: Print synced traces to stderr
To match the existing behaviour.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3836>
---
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);
More information about the mesa-commit
mailing list