aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu/amdgpu_bo.c
diff options
context:
space:
mode:
authormonk.liu <monk.liu@amd.com>2015-04-23 13:19:57 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-08-05 13:47:48 -0400
commitcc01c3cb5ae708689228d1ec6e751f91e7f90741 (patch)
treeaad56fc766712cf4e790280ec9a4c3d713f85ce4 /amdgpu/amdgpu_bo.c
parent2f2c8ac0f4507474ac332fa33afcb8ccfeeb3938 (diff)
downloadexternal_libdrm-cc01c3cb5ae708689228d1ec6e751f91e7f90741.tar.gz
external_libdrm-cc01c3cb5ae708689228d1ec6e751f91e7f90741.tar.bz2
external_libdrm-cc01c3cb5ae708689228d1ec6e751f91e7f90741.zip
amdgpu: add missing mutex lock/unlock pair
Signed-off-by: monk.liu <monk.liu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_bo.c')
-rw-r--r--amdgpu/amdgpu_bo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index cbc4cd6c..b4ca7f72 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -626,8 +626,10 @@ int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev,
amdgpu_bo_free_internal(bo);
return r;
}
+ pthread_mutex_lock(&dev->bo_table_mutex);
util_hash_table_set(dev->bo_vas,
(void*)(uintptr_t)bo->virtual_mc_base_address, bo);
+ pthread_mutex_unlock(&dev->bo_table_mutex);
info->buf_handle = bo;
info->virtual_mc_base_address = bo->virtual_mc_base_address;
info->virtual_mc_base_address += off;