aboutsummaryrefslogtreecommitdiffstats
path: root/amdgpu
diff options
context:
space:
mode:
authorChristian König2015-05-18 08:28:30 -0500
committerAlex Deucher2015-08-05 12:47:50 -0500
commitd5c0b2a172126c0de116bfc8863953b13e0ed5df (patch)
treeda77a42370a9408304c62319abd38822f7dc8751 /amdgpu
parent7244698ddc3f33158188adcb50291157a7e99b81 (diff)
downloadexternal-libdrm-d5c0b2a172126c0de116bfc8863953b13e0ed5df.tar.gz
external-libdrm-d5c0b2a172126c0de116bfc8863953b13e0ed5df.tar.xz
external-libdrm-d5c0b2a172126c0de116bfc8863953b13e0ed5df.zip
amdgpu: remove bo_vas hash table v2
Not used any more. v2: Keep accidental removed lines. Signed-off-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'amdgpu')
-rw-r--r--amdgpu/amdgpu_bo.c11
-rw-r--r--amdgpu/amdgpu_device.c2
-rw-r--r--amdgpu/amdgpu_internal.h2
3 files changed, 0 insertions, 15 deletions
diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
index ec049557..11d352ae 100644
--- a/amdgpu/amdgpu_bo.c
+++ b/amdgpu/amdgpu_bo.c
@@ -142,11 +142,6 @@ int amdgpu_bo_alloc(amdgpu_device_handle dev,
142 amdgpu_bo_free_internal(bo); 142 amdgpu_bo_free_internal(bo);
143 return r; 143 return r;
144 } 144 }
145 pthread_mutex_lock(&dev->bo_table_mutex);
146
147 util_hash_table_set(dev->bo_vas,
148 (void*)(uintptr_t)bo->virtual_mc_base_address, bo);
149 pthread_mutex_unlock(&dev->bo_table_mutex);
150 } 145 }
151 146
152 info->buf_handle = bo; 147 info->buf_handle = bo;
@@ -468,8 +463,6 @@ int amdgpu_bo_import(amdgpu_device_handle dev,
468 return r; 463 return r;
469 } 464 }
470 465
471 util_hash_table_set(dev->bo_vas,
472 (void*)(uintptr_t)bo->virtual_mc_base_address, bo);
473 util_hash_table_set(dev->bo_handles, (void*)(uintptr_t)bo->handle, bo); 466 util_hash_table_set(dev->bo_handles, (void*)(uintptr_t)bo->handle, bo);
474 pthread_mutex_unlock(&dev->bo_table_mutex); 467 pthread_mutex_unlock(&dev->bo_table_mutex);
475 468
@@ -644,10 +637,6 @@ int amdgpu_create_bo_from_user_mem(amdgpu_device_handle dev,
644 amdgpu_bo_free_internal(bo); 637 amdgpu_bo_free_internal(bo);
645 return r; 638 return r;
646 } 639 }
647 pthread_mutex_lock(&dev->bo_table_mutex);
648 util_hash_table_set(dev->bo_vas,
649 (void*)(uintptr_t)bo->virtual_mc_base_address, bo);
650 pthread_mutex_unlock(&dev->bo_table_mutex);
651 info->buf_handle = bo; 640 info->buf_handle = bo;
652 info->virtual_mc_base_address = bo->virtual_mc_base_address; 641 info->virtual_mc_base_address = bo->virtual_mc_base_address;
653 info->virtual_mc_base_address += off; 642 info->virtual_mc_base_address += off;
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index 048a9093..7a997cb5 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -192,7 +192,6 @@ int amdgpu_device_initialize(int fd,
192 dev->bo_flink_names = util_hash_table_create(handle_hash, 192 dev->bo_flink_names = util_hash_table_create(handle_hash,
193 handle_compare); 193 handle_compare);
194 dev->bo_handles = util_hash_table_create(handle_hash, handle_compare); 194 dev->bo_handles = util_hash_table_create(handle_hash, handle_compare);
195 dev->bo_vas = util_hash_table_create(handle_hash, handle_compare);
196 pthread_mutex_init(&dev->bo_table_mutex, NULL); 195 pthread_mutex_init(&dev->bo_table_mutex, NULL);
197 196
198 /* Check if acceleration is working. */ 197 /* Check if acceleration is working. */
@@ -228,7 +227,6 @@ void amdgpu_device_free_internal(amdgpu_device_handle dev)
228{ 227{
229 util_hash_table_destroy(dev->bo_flink_names); 228 util_hash_table_destroy(dev->bo_flink_names);
230 util_hash_table_destroy(dev->bo_handles); 229 util_hash_table_destroy(dev->bo_handles);
231 util_hash_table_destroy(dev->bo_vas);
232 pthread_mutex_destroy(&dev->bo_table_mutex); 230 pthread_mutex_destroy(&dev->bo_table_mutex);
233 pthread_mutex_destroy(&(dev->vamgr.bo_va_mutex)); 231 pthread_mutex_destroy(&(dev->vamgr.bo_va_mutex));
234 util_hash_table_remove(fd_tab, UINT_TO_PTR(dev->fd)); 232 util_hash_table_remove(fd_tab, UINT_TO_PTR(dev->fd));
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index 7910d340..77b12443 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -68,8 +68,6 @@ struct amdgpu_device {
68 struct util_hash_table *bo_handles; 68 struct util_hash_table *bo_handles;
69 /** List of buffer GEM flink names. Protected by bo_table_mutex. */ 69 /** List of buffer GEM flink names. Protected by bo_table_mutex. */
70 struct util_hash_table *bo_flink_names; 70 struct util_hash_table *bo_flink_names;
71 /** List of buffer virtual memory ranges. Protected by bo_table_mutex. */
72 struct util_hash_table *bo_vas;
73 /** This protects all hash tables. */ 71 /** This protects all hash tables. */
74 pthread_mutex_t bo_table_mutex; 72 pthread_mutex_t bo_table_mutex;
75 struct amdgpu_bo_va_mgr vamgr; 73 struct amdgpu_bo_va_mgr vamgr;