Mesa (master): panfrost: Don't add the tiler BO when it's not accessed

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 5 10:23:50 UTC 2021


Module: Mesa
Branch: master
Commit: 7ecb2eaf26dd980d28a8a9ee3caab72c8336077f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7ecb2eaf26dd980d28a8a9ee3caab72c8336077f

Author: Boris Brezillon <boris.brezillon at collabora.com>
Date:   Wed Feb  3 08:44:03 2021 +0100

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 <boris.brezillon at collabora.com>
Tested-by: Icecream95 <ixn at disroot.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8822>

---

 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)



More information about the mesa-commit mailing list