Signed-off-by: Emil Velikov <emil.l.velikov@xxxxxxxxx> --- amdgpu/amdgpu_internal.h | 18 ++++++++++++------ amdgpu/amdgpu_vamgr.c | 17 ++++++++++------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h index ab01bb5..7f86da9 100644 --- a/amdgpu/amdgpu_internal.h +++ b/amdgpu/amdgpu_internal.h @@ -31,6 +31,8 @@ #include <assert.h> #include <pthread.h> + +#include "libdrm_macros.h" #include "xf86atomic.h" #include "amdgpu.h" #include "util_double_list.h" @@ -121,15 +123,19 @@ void amdgpu_device_free_internal(amdgpu_device_handle dev); void amdgpu_bo_free_internal(amdgpu_bo_handle bo); -struct amdgpu_bo_va_mgr* amdgpu_vamgr_get_global(struct amdgpu_device *dev); +drm_private struct amdgpu_bo_va_mgr* +amdgpu_vamgr_get_global(struct amdgpu_device *dev); -void amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, struct amdgpu_bo_va_mgr *src); +drm_private void +amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, + struct amdgpu_bo_va_mgr *src); -uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, - uint64_t alignment, uint64_t base_required); +drm_private uint64_t +amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, + uint64_t alignment, uint64_t base_required); -void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, - uint64_t size); +drm_private void +amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, uint64_t size); int amdgpu_query_gpu_info_init(amdgpu_device_handle dev); diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c index e2a4c87..b5d330f 100644 --- a/amdgpu/amdgpu_vamgr.c +++ b/amdgpu/amdgpu_vamgr.c @@ -66,7 +66,8 @@ static void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr) pthread_mutex_destroy(&mgr->bo_va_mutex); } -struct amdgpu_bo_va_mgr * amdgpu_vamgr_get_global(struct amdgpu_device *dev) +drm_private struct amdgpu_bo_va_mgr * +amdgpu_vamgr_get_global(struct amdgpu_device *dev) { int ref; ref = atomic_inc_return(&vamgr.refcount); @@ -76,16 +77,18 @@ struct amdgpu_bo_va_mgr * amdgpu_vamgr_get_global(struct amdgpu_device *dev) return &vamgr; } -void amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, - struct amdgpu_bo_va_mgr *src) +drm_private void +amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, + struct amdgpu_bo_va_mgr *src) { if (update_references(&(*dst)->refcount, NULL)) amdgpu_vamgr_deinit(*dst); *dst = src; } -uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, - uint64_t alignment, uint64_t base_required) +drm_private uint64_t +amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, + uint64_t alignment, uint64_t base_required) { struct amdgpu_bo_va_hole *hole, *n; uint64_t offset = 0, waste = 0; @@ -170,8 +173,8 @@ uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, return offset; } -void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, - uint64_t va, uint64_t size) +drm_private void +amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, uint64_t size) { struct amdgpu_bo_va_hole *hole; -- 2.5.0 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel