aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2018-09-11 14:04:57 -0400
committerRob Clark <[email protected]>2018-09-27 15:29:45 -0400
commit8930e836429506249074f3757185378f0776ee67 (patch)
tree677f6f920eb167d3ab764a0a68db452abad71779
parentef6d15f8a86128251cb6320f7dcda0ee9e36d86a (diff)
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 <[email protected]>
-rw-r--r--src/gallium/drivers/freedreno/freedreno_batch.c2
1 files changed, 1 insertions, 1 deletions
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);