From: Alyssa Rosenzweig Date: Tue, 7 Jul 2020 21:14:43 +0000 (-0400) Subject: panfrost: Pass polygon_list to tiler init function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fa722887da18a4b498df29532a77748195ef53f4;p=mesa.git panfrost: Pass polygon_list to tiler init function So it doesn't need to allocate it by itself. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 674c84d5d11..2295f9ced8c 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -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); diff --git a/src/gallium/drivers/panfrost/pan_scoreboard.c b/src/gallium/drivers/panfrost/pan_scoreboard.c index d0b1f8a22c7..06349e36ac2 100644 --- a/src/gallium/drivers/panfrost/pan_scoreboard.c +++ b/src/gallium/drivers/panfrost/pan_scoreboard.c @@ -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, diff --git a/src/gallium/drivers/panfrost/pan_scoreboard.h b/src/gallium/drivers/panfrost/pan_scoreboard.h index 31bf96707ca..d6b91a48269 100644 --- a/src/gallium/drivers/panfrost/pan_scoreboard.h +++ b/src/gallium/drivers/panfrost/pan_scoreboard.h @@ -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