Mesa (master): freedreno: fix missing locking

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sat Apr 4 00:24:57 UTC 2020


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

Author: Rob Clark <robdclark at chromium.org>
Date:   Thu Apr  2 12:12:32 2020 -0700

freedreno: fix missing locking

Fixes: d0b3ccb0607 ("freedreno: Fix detection of being in a blit for acc queries.")
Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4423>

---

 src/gallium/drivers/freedreno/freedreno_query_acc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/freedreno/freedreno_query_acc.c b/src/gallium/drivers/freedreno/freedreno_query_acc.c
index 46efe61aae9..5bc10bce635 100644
--- a/src/gallium/drivers/freedreno/freedreno_query_acc.c
+++ b/src/gallium/drivers/freedreno/freedreno_query_acc.c
@@ -87,7 +87,9 @@ fd_acc_query_resume(struct fd_acc_query *aq, struct fd_batch *batch)
 	aq->batch = batch;
 	p->resume(aq, aq->batch);
 
+	mtx_lock(&batch->ctx->screen->lock);
 	fd_batch_resource_used(batch, fd_resource(aq->prsc), true);
+	mtx_unlock(&batch->ctx->screen->lock);
 }
 
 static void



More information about the mesa-commit mailing list