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>
(cherry picked from commit 00a81e9909)
This commit is contained in:
Alex Smith 2018-01-04 11:28:46 +00:00 committed by Juan A. Suarez Romero
parent b5bdc36880
commit 23539c0fa1

View file

@ -1108,8 +1108,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;