summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQiang Yu <Qiang.Yu@amd.com>2017-08-10 15:13:07 +0800
committerQiang Yu <Qiang.Yu@amd.com>2017-08-10 15:13:07 +0800
commitcdb9f3dc59769a02f0900ec0bfe13d190a8d13e6 (patch)
tree0ee79b0c58a4da2173d2a60bdcd3b64eaff128a1
parenteaea24b7acfb8d2cb1db8baa8f353d9fcc69a2b6 (diff)
Revert "amdgpu:fix potential deadlock"
This reverts commit eaea24b7acfb8d2cb1db8baa8f353d9fcc69a2b6. The reverted commit is submitted by mistaken. Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
-rw-r--r--amdgpu/amdgpu_bo.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index c973a0d0..09028c73 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -673,10 +673,10 @@ int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu)
pthread_mutex_unlock(&bo->cpu_access_mutex);
return -errno;
}
+ amdgpu_add_handle_to_table(bo);
bo->cpu_ptr = ptr;
bo->cpu_map_count = 1;
pthread_mutex_unlock(&bo->cpu_access_mutex);
- amdgpu_add_handle_to_table(bo);
*cpu = ptr;
return 0;