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>main
parent
7244698ddc
commit
d5c0b2a172
|
@ -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;
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue