[Mesa-dev] [PATCH libdrm 2/9] panfrost/midgard: Reset job counters once the job is submitted

Rohan Garg rohan.garg at collabora.com
Wed Jun 12 11:24:32 UTC 2019


Move the reset out of frame invalidation into job submission
---
 src/gallium/drivers/panfrost/pan_context.c | 5 -----
 src/gallium/drivers/panfrost/pan_job.c     | 4 ++++
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c
index 4680dd2ff8c..d6a54f9a9f5 100644
--- a/src/gallium/drivers/panfrost/pan_context.c
+++ b/src/gallium/drivers/panfrost/pan_context.c
@@ -384,11 +384,6 @@ panfrost_invalidate_frame(struct panfrost_context *ctx)
 
         /* XXX */
         ctx->dirty |= PAN_DIRTY_SAMPLERS | PAN_DIRTY_TEXTURES;
-
-        /* Reset job counters */
-        ctx->draw_count = 0;
-        ctx->vertex_job_count = 0;
-        ctx->tiler_job_count = 0;
 }
 
 /* In practice, every field of these payloads should be configurable
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 1e09760871c..333c9f1f147 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -158,6 +158,10 @@ panfrost_job_submit(struct panfrost_context *ctx, struct panfrost_job *job)
         if (ret)
                 fprintf(stderr, "panfrost_job_submit failed: %d\n", ret);
 
+        /* Reset job counters */
+        ctx->draw_count = 0;
+        ctx->vertex_job_count = 0;
+        ctx->tiler_job_count = 0;
 }
 
 void
-- 
2.17.1



More information about the mesa-dev mailing list