aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Wang2015-05-21 04:21:21 -0500
committerAlex Deucher2015-08-05 12:47:50 -0500
commit322d02d025cad1a74138c86937c5d5f3ef6215c7 (patch)
treeccedcb0de4a6da4b4b1bd4b5a8fe897e647fe5f3 /amdgpu/amdgpu_device.c
parentba1653eff8bd8ecc3d5fd5b2bbab604878cfa7e0 (diff)
downloadexternal-libdrm-322d02d025cad1a74138c86937c5d5f3ef6215c7.tar.gz
external-libdrm-322d02d025cad1a74138c86937c5d5f3ef6215c7.tar.xz
external-libdrm-322d02d025cad1a74138c86937c5d5f3ef6215c7.zip
amdgpu: make vamgr global
This is the first sub-patch of va interface task, the va task is about adding more va management interfaces for UMD, by design, the vamgr should be per-process rather than per-device. Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Christian K├Ânig <christian.koenig@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_device.c')
-rw-r--r--amdgpu/amdgpu_device.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/amdgpu/amdgpu_device.c b/amdgpu/amdgpu_device.c
index 7a997cb5..212e7075 100644
--- a/amdgpu/amdgpu_device.c
+++ b/amdgpu/amdgpu_device.c
@@ -207,7 +207,7 @@ int amdgpu_device_initialize(int fd,
207 if (r) 207 if (r)
208 goto cleanup; 208 goto cleanup;
209 209
210 amdgpu_vamgr_init(dev); 210 dev->vamgr = amdgpu_vamgr_get_global(dev);
211 211
212 *major_version = dev->major_version; 212 *major_version = dev->major_version;
213 *minor_version = dev->minor_version; 213 *minor_version = dev->minor_version;
@@ -225,10 +225,10 @@ cleanup:
225 225
226void amdgpu_device_free_internal(amdgpu_device_handle dev) 226void amdgpu_device_free_internal(amdgpu_device_handle dev)
227{ 227{
228 amdgpu_vamgr_reference(&dev->vamgr, NULL);
228 util_hash_table_destroy(dev->bo_flink_names); 229 util_hash_table_destroy(dev->bo_flink_names);
229 util_hash_table_destroy(dev->bo_handles); 230 util_hash_table_destroy(dev->bo_handles);
230 pthread_mutex_destroy(&dev->bo_table_mutex); 231 pthread_mutex_destroy(&dev->bo_table_mutex);
231 pthread_mutex_destroy(&(dev->vamgr.bo_va_mutex));
232 util_hash_table_remove(fd_tab, UINT_TO_PTR(dev->fd)); 232 util_hash_table_remove(fd_tab, UINT_TO_PTR(dev->fd));
233 free(dev); 233 free(dev);
234} 234}