From 7ecb2eaf26dd980d28a8a9ee3caab72c8336077f Mon Sep 17 00:00:00 2001 From: Boris Brezillon Date: Wed, 3 Feb 2021 08:44:03 +0100 Subject: [PATCH] panfrost: Don't add the tiler BO when it's not accessed Only batches involving the tiler block need to add the tiler heap to the list of accessed BOs. While at it, clarify who's accessing this heap. Signed-off-by: Boris Brezillon Tested-by: Icecream95 Part-of: --- src/gallium/drivers/panfrost/pan_job.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index 440ba38bbb5..ae3f78b941e 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -982,9 +982,12 @@ panfrost_batch_submit_ioctl(struct panfrost_batch *batch, panfrost_pool_get_bo_handles(&batch->invisible_pool, bo_handles + submit.bo_handle_count); submit.bo_handle_count += panfrost_pool_num_bos(&batch->invisible_pool); - /* Used by all tiler jobs, and occasionally by fragment jobs. - * (XXX: skip for compute-only) */ - bo_handles[submit.bo_handle_count++] = dev->tiler_heap->gem_handle; + /* Add the tiler heap to the list of accessed BOs if the batch has at + * least one tiler job. Tiler heap is written by tiler jobs and read + * by fragment jobs (the polygon list is coming from this heap). + */ + if (batch->scoreboard.first_tiler) + bo_handles[submit.bo_handle_count++] = dev->tiler_heap->gem_handle; submit.bo_handles = (u64) (uintptr_t) bo_handles; if (ctx->is_noop)