summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorAlex Smith <[email protected]>2018-01-04 11:28:46 +0000
committerAlex Smith <[email protected]>2018-01-04 14:54:02 +0000
commit00a81e9909365065545a3c2dc362b645a8238fb2 (patch)
tree3fbfe474c80f75e7323cab744a315ef0e36b2beb /src/intel
parente923075a82af63e5b5019c17dcf86a573deb7282 (diff)
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 <[email protected]> Cc: [email protected] Reviewed-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_allocator.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/intel/vulkan/anv_allocator.c b/src/intel/vulkan/anv_allocator.c
index 33bd3c68c55..fe14d6cfabd 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;