From 8930e836429506249074f3757185378f0776ee67 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Tue, 11 Sep 2018 14:04:57 -0400 Subject: [PATCH] freedreno: fix potential hang when destroying batch batch_flush_reset_dependencies() expects to be called unlocked, and can call fd_batch_reference() which can try to aquire the screen lock again. Signed-off-by: Rob Clark --- src/gallium/drivers/freedreno/freedreno_batch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gallium/drivers/freedreno/freedreno_batch.c b/src/gallium/drivers/freedreno/freedreno_batch.c index b3d14665a21..340756e059a 100644 --- a/src/gallium/drivers/freedreno/freedreno_batch.c +++ b/src/gallium/drivers/freedreno/freedreno_batch.c @@ -235,10 +235,10 @@ __fd_batch_destroy(struct fd_batch *batch) debug_assert(batch->resources->entries == 0); _mesa_set_destroy(batch->resources, NULL); + fd_context_unlock(ctx); batch_flush_reset_dependencies(batch, false); debug_assert(batch->dependents_mask == 0); - fd_context_unlock(ctx); util_copy_framebuffer_state(&batch->framebuffer, NULL); batch_fini(batch); free(batch); -- 2.30.2