aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'amdgpu/amdgpu_device.c')
-rw-r--r--amdgpu/amdgpu_device.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index cad7133d..11714e47 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -131,8 +131,7 @@ static int amdgpu_get_auth(int fd, int *auth)
131 131
132static void amdgpu_device_free_internal(amdgpu_device_handle dev) 132static void amdgpu_device_free_internal(amdgpu_device_handle dev)
133{ 133{
134 amdgpu_vamgr_deinit(dev->vamgr_32); 134 amdgpu_vamgr_deinit(&dev->vamgr_32);
135 free(dev->vamgr_32);
136 amdgpu_vamgr_deinit(dev->vamgr); 135 amdgpu_vamgr_deinit(dev->vamgr);
137 free(dev->vamgr); 136 free(dev->vamgr);
138 util_hash_table_destroy(dev->bo_flink_names); 137 util_hash_table_destroy(dev->bo_flink_names);
@@ -270,10 +269,7 @@ int amdgpu_device_initialize(int fd,
270 if (start > 0xffffffff) 269 if (start > 0xffffffff)
271 goto free_va; /* shouldn't get here */ 270 goto free_va; /* shouldn't get here */
272 271
273 dev->vamgr_32 = calloc(1, sizeof(struct amdgpu_bo_va_mgr)); 272 amdgpu_vamgr_init(&dev->vamgr_32, start, max,
274 if (dev->vamgr_32 == NULL)
275 goto free_va;
276 amdgpu_vamgr_init(dev->vamgr_32, start, max,
277 dev->dev_info.virtual_address_alignment); 273 dev->dev_info.virtual_address_alignment);
278 274
279 *major_version = dev->major_version; 275 *major_version = dev->major_version;