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;