panfrost: Stop passing has_draws to panfrost_drm_submit_vs_fs_batch()
authorBoris Brezillon <boris.brezillon@collabora.com>
Sat, 14 Sep 2019 07:11:09 +0000 (09:11 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 18 Sep 2019 08:28:03 +0000 (10:28 +0200)
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@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_drm.c
src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_screen.h

index b77af714d1177f5c70476cbe6921dd9b7a237dfd..c41701e16ff50a6802d7860acc938e2fb5bdf69e 100644 (file)
@@ -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);
index e06440010aebcb2937848753064e8b3787e1da98..ecaf081f1c3810500ea3f2d9d2b53bc20e1c5cf0 100644 (file)
@@ -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);
index 0124e559a700f0c5ebd24d49796276310dc1a41b..2f17e2dae726d05ab57d282de0f56016ccb93271 100644 (file)
@@ -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