[Mesa-dev] [PATCH v2 06/37] panfrost: Stop passing has_draws to panfrost_drm_submit_vs_fs_batch()

Boris Brezillon boris.brezillon at collabora.com
Mon Sep 16 09:36:44 UTC 2019


has_draws can be inferred directly from the batch->last_job value, no
need to pass it around.

Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
---
 src/gallium/drivers/panfrost/pan_drm.c    | 3 ++-
 src/gallium/drivers/panfrost/pan_job.c    | 4 +---
 src/gallium/drivers/panfrost/pan_screen.h | 2 +-
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/panfrost/pan_drm.c b/src/gallium/drivers/panfrost/pan_drm.c
index b77af714d117..c41701e16ff5 100644
--- a/src/gallium/drivers/panfrost/pan_drm.c
+++ b/src/gallium/drivers/panfrost/pan_drm.c
@@ -271,9 +271,10 @@ panfrost_drm_submit_batch(struct panfrost_batch *batch, u64 first_job_desc,
 }
 
 int
-panfrost_drm_submit_vs_fs_batch(struct panfrost_batch *batch, bool has_draws)
+panfrost_drm_submit_vs_fs_batch(struct panfrost_batch *batch)
 {
         struct panfrost_context *ctx = batch->ctx;
+        bool has_draws = batch->last_job.gpu;
         int ret = 0;
 
         panfrost_batch_add_bo(batch, ctx->scratchpad);
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index e06440010aeb..ecaf081f1c38 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -284,9 +284,7 @@ panfrost_batch_submit(struct panfrost_batch *batch)
 
         panfrost_scoreboard_link_batch(batch);
 
-        bool has_draws = batch->last_job.gpu;
-
-        ret = panfrost_drm_submit_vs_fs_batch(batch, has_draws);
+        ret = panfrost_drm_submit_vs_fs_batch(batch);
 
         if (ret)
                 fprintf(stderr, "panfrost_batch_submit failed: %d\n", ret);
diff --git a/src/gallium/drivers/panfrost/pan_screen.h b/src/gallium/drivers/panfrost/pan_screen.h
index 0124e559a700..2f17e2dae726 100644
--- a/src/gallium/drivers/panfrost/pan_screen.h
+++ b/src/gallium/drivers/panfrost/pan_screen.h
@@ -132,7 +132,7 @@ panfrost_drm_import_bo(struct panfrost_screen *screen, int fd);
 int
 panfrost_drm_export_bo(struct panfrost_screen *screen, const struct panfrost_bo *bo);
 int
-panfrost_drm_submit_vs_fs_batch(struct panfrost_batch *batch, bool has_draws);
+panfrost_drm_submit_vs_fs_batch(struct panfrost_batch *batch);
 unsigned
 panfrost_drm_query_gpu_version(struct panfrost_screen *screen);
 int
-- 
2.21.0



More information about the mesa-dev mailing list