Mesa (master): anv: Add missing unlock in anv_scratch_pool_alloc
Alex Smith
aejsmith at kemper.freedesktop.org
Thu Jan 4 14:56:06 UTC 2018
Module: Mesa
Branch: master
Commit: 00a81e9909365065545a3c2dc362b645a8238fb2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=00a81e9909365065545a3c2dc362b645a8238fb2
Author: Alex Smith <asmith at feralinteractive.com>
Date: Thu Jan 4 11:28:46 2018 +0000
anv: Add missing unlock in anv_scratch_pool_alloc
Fixes hangs seen due to the lock not being released here.
Signed-off-by: Alex Smith <asmith at feralinteractive.com>
Cc: mesa-stable at lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/vulkan/anv_allocator.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index 33bd3c68c5..fe14d6cfab 100644
--- a/src/intel/vulkan/anv_allocator.c
+++ b/src/intel/vulkan/anv_allocator.c
@@ -1088,8 +1088,10 @@ anv_scratch_pool_alloc(struct anv_device *device, struct anv_scratch_pool *pool,
pthread_mutex_lock(&device->mutex);
__sync_synchronize();
- if (bo->exists)
+ if (bo->exists) {
+ pthread_mutex_unlock(&device->mutex);
return &bo->bo;
+ }
const struct anv_physical_device *physical_device =
&device->instance->physicalDevice;
More information about the mesa-commit
mailing list