From 20dd37024b045881d98a55b1927b0dab29d1edd3 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Tue, 26 May 2020 16:57:44 -0400 Subject: [PATCH] panfrost: Fix fence leak When overwriting the writer, we need to release the old reference. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Fixes: 2dad9fde505 ("panfrost: Start tracking inter-batch dependencies") Cc: mesa-stable Part-of: --- src/gallium/drivers/panfrost/pan_job.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/gallium/drivers/panfrost/pan_job.c b/src/gallium/drivers/panfrost/pan_job.c index fb98b9a4bab..929bd993e74 100644 --- a/src/gallium/drivers/panfrost/pan_job.c +++ b/src/gallium/drivers/panfrost/pan_job.c @@ -462,6 +462,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; -- 2.30.2