summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>2020-05-26 16:57:44 -0400
committerEric Engestrom <eric@engestrom.ch>2020-07-22 22:30:04 +0200
commit273b9a1ccc2466a24d5acd009a05c780017461b6 (patch)
treeebbaa1a48842a520243043f6182df5b7045081c3 /src
parentfd3caf582843dfe4bf70b51d05890affa8830e6c (diff)
panfrost: Fix fence leak
When overwriting the writer, we need to release the old reference. Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Fixes: 2dad9fde505 ("panfrost: Start tracking inter-batch dependencies") Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5859> (cherry picked from commit 20dd37024b045881d98a55b1927b0dab29d1edd3)
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/panfrost/pan_job.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c
index 461d29aeaa0..154ed833927 100644
--- a/src/gallium/drivers/panfrost/pan_job.c
+++ b/src/gallium/drivers/panfrost/pan_job.c
@@ -453,6 +453,9 @@ panfrost_batch_update_bo_access(struct panfrost_batch *batch,
}
panfrost_batch_fence_reference(batch->out_sync);
+ if (access->writer)
+ panfrost_batch_fence_unreference(access->writer);
+
/* We now are the new writer. */
access->writer = batch->out_sync;
access->type = access_type;