From: Alyssa Rosenzweig Date: Tue, 26 May 2020 20:57:44 +0000 (-0400) Subject: panfrost: Fix fence leak X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20dd37024b045881d98a55b1927b0dab29d1edd3;p=mesa.git 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: --- 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;