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@feralinteractive.com>
Cc: mesa-stable@lists.freedesktop.org
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
Alex Smith 2018-01-04 11:28:46 +00:00
parent e923075a82
commit 00a81e9909

View file

@ -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;