OSDN Git Service

amdgpu: remove bo_vas hash table v2
authorChristian König <christian.koenig@amd.com>
Mon, 18 May 2015 13:28:30 +0000 (15:28 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 5 Aug 2015 17:47:50 +0000 (13:47 -0400)
Not used any more.

v2: Keep accidental removed lines.

Signed-off-by: Christian König <christian.koenig@amd.com>
amdgpu/amdgpu_bo.c
amdgpu/amdgpu_device.c
amdgpu/amdgpu_internal.h

index ec04955..11d352a 100644 (file)
@@ -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;
index 048a909..7a997cb 100644 (file)
@@ -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));
index 7910d34..77b1244 100644 (file)
@@ -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;