panfrost: Pass polygon_list to tiler init function
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tue, 7 Jul 2020 21:14:43 +0000 (17:14 -0400)
committerAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Thu, 9 Jul 2020 16:03:08 +0000 (12:03 -0400)
So it doesn't need to allocate it by itself.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5827>

src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_scoreboard.c
src/gallium/drivers/panfrost/pan_scoreboard.h

index 674c84d5d119746cc789ed3fdc88d30e6bac0371..2295f9ced8c0d0b3f3e9e4c8a8c10e7678b95eeb 100644 (file)
@@ -1053,7 +1053,10 @@ panfrost_batch_submit(struct panfrost_batch *batch)
                         panfrost_attach_mfbd(batch, ~0);
         }
 
-        panfrost_scoreboard_initialize_tiler(batch);
+        mali_ptr polygon_list = panfrost_batch_get_polygon_list(batch,
+                MALI_TILER_MINIMUM_HEADER_SIZE);
+
+        panfrost_scoreboard_initialize_tiler(batch, polygon_list);
 
         ret = panfrost_batch_submit_jobs(batch);
 
index d0b1f8a22c799b24c765854be01f40296102fdc3..06349e36ac271dd3192d6a89e792a04024d6bb1f 100644 (file)
@@ -173,7 +173,7 @@ panfrost_new_job(
  * this is called right before frame submission. */
 
 void
-panfrost_scoreboard_initialize_tiler(struct panfrost_batch *batch)
+panfrost_scoreboard_initialize_tiler(struct panfrost_batch *batch, mali_ptr polygon_list)
 {
         struct panfrost_device *dev = pan_device(batch->ctx->base.screen);
 
@@ -184,9 +184,6 @@ panfrost_scoreboard_initialize_tiler(struct panfrost_batch *batch)
         /* Okay, we do. Let's generate it. We'll need the job's polygon list
          * regardless of size. */
 
-        mali_ptr polygon_list = panfrost_batch_get_polygon_list(batch,
-                MALI_TILER_MINIMUM_HEADER_SIZE);
-
         struct mali_job_descriptor_header job = {
                 .job_type = JOB_TYPE_WRITE_VALUE,
                 .job_index = batch->scoreboard.write_value_index,
index 31bf96707ca41a91d4a780fd5dd0e6efb9719da2..d6b91a482696bcbafd8ed49f0304a09bbb2506de 100644 (file)
@@ -54,6 +54,7 @@ panfrost_new_job(
                 void *payload, size_t payload_size,
                 bool inject);
 
-void panfrost_scoreboard_initialize_tiler(struct panfrost_batch *batch);
+void panfrost_scoreboard_initialize_tiler(struct panfrost_batch *batch,
+                mali_ptr polygon_list);
 
 #endif