From b47181897770520bb5afcebc2c2c3ffaf7729a36 Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 7 Aug 2015 16:54:29 +0100 Subject: [PATCH] amdgpu/amdgpu_vamgr: hide private symbols from global namespace MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Emil Velikov Reviewed-by: Alex Deucher Reviewed-by: Christian König Reviewed-by: Jammy Zhou --- 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 ab01bb52..7f86da93 100644 --- a/amdgpu/amdgpu_internal.h +++ b/amdgpu/amdgpu_internal.h @@ -31,6 +31,8 @@ #include #include + +#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 e2a4c875..b5d330f6 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;