summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2015-05-18 15:28:30 +0200
committerAlex Deucher <alexander.deucher@amd.com>2015-07-30 00:11:10 -0400
commite5493b824f212b5aa29a0ab86bcd7c66a047b5cd (patch)
tree599e7d29a9d905081108d7ec0630dd2454f18803
parent9fb2522cad38d0796d612f2b89877f88ea253745 (diff)
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>
-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,
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;
@@ -468,8 +463,6 @@ int amdgpu_bo_import(amdgpu_device_handle dev,
return r;
}
- util_hash_table_set(dev->bo_vas,
- (void*)(uintptr_t)bo->virtual_mc_base_address, bo);
util_hash_table_set(dev->bo_handles, (void*)(uintptr_t)bo->handle, bo);
pthread_mutex_unlock(&dev->bo_table_mutex);
@@ -644,10 +637,6 @@ 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;
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,
dev->bo_flink_names = util_hash_table_create(handle_hash,
handle_compare);
dev->bo_handles = util_hash_table_create(handle_hash, handle_compare);
- dev->bo_vas = util_hash_table_create(handle_hash, handle_compare);
pthread_mutex_init(&dev->bo_table_mutex, NULL);
/* Check if acceleration is working. */
@@ -228,7 +227,6 @@ void amdgpu_device_free_internal(amdgpu_device_handle dev)
{
util_hash_table_destroy(dev->bo_flink_names);
util_hash_table_destroy(dev->bo_handles);
- util_hash_table_destroy(dev->bo_vas);
pthread_mutex_destroy(&dev->bo_table_mutex);
pthread_mutex_destroy(&(dev->vamgr.bo_va_mutex));
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 {
struct util_hash_table *bo_handles;
/** List of buffer GEM flink names. Protected by bo_table_mutex. */
struct util_hash_table *bo_flink_names;
- /** List of buffer virtual memory ranges. Protected by bo_table_mutex. */
- struct util_hash_table *bo_vas;
/** This protects all hash tables. */
pthread_mutex_t bo_table_mutex;
struct amdgpu_bo_va_mgr vamgr;