[4/4] panfrost/nondrm: Split out dump_counters

Submitted by Alyssa Rosenzweig on Feb. 22, 2019, 11:56 p.m.

Details

Message ID 20190222235627.18768-5-alyssa@rosenzweig.io
State New
Headers show
Series "panfrost: Improve non-DRM integration" ( rev: 1 ) in Mesa

Not browsing as part of any series.

Commit Message

Alyssa Rosenzweig Feb. 22, 2019, 11:56 p.m.
Previously, this function was implied a part of the job submit.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
---
 src/gallium/drivers/panfrost/pan_context.c | 2 ++
 src/gallium/drivers/panfrost/pan_screen.h  | 1 +
 2 files changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index f2bb44d1342..3d610431f9e 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -1537,6 +1537,8 @@  panfrost_submit_frame(struct panfrost_context *ctx, bool flush_immediate)
                 screen->driver->force_flush_fragment(ctx);
 
 #ifdef DUMP_PERFORMANCE_COUNTERS
+        screen->driver->dump_counters(screen);
+
         char filename[128];
         snprintf(filename, sizeof(filename), "/dev/shm/frame%d.mdgprf", ++performance_counter_number);
         FILE *fp = fopen(filename, "wb");
diff --git a/src/gallium/drivers/panfrost/pan_screen.h b/src/gallium/drivers/panfrost/pan_screen.h
index 1bf46dee6bb..ebca4d37dd1 100644
--- a/src/gallium/drivers/panfrost/pan_screen.h
+++ b/src/gallium/drivers/panfrost/pan_screen.h
@@ -66,6 +66,7 @@  struct panfrost_driver {
         void (*free_imported_bo) (struct panfrost_screen *screen,
                              struct panfrost_bo *bo);
         void (*enable_counters) (struct panfrost_screen *screen);
+        void (*dump_counters) (struct panfrost_screen *screen);
 };
 
 struct panfrost_screen {