amdgpu/amdgpu_vamgr: hide private symbols from global namespace
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>main
parent
c19fa2b1ca
commit
b471818977
|
@ -31,6 +31,8 @@
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
|
|
||||||
|
#include "libdrm_macros.h"
|
||||||
#include "xf86atomic.h"
|
#include "xf86atomic.h"
|
||||||
#include "amdgpu.h"
|
#include "amdgpu.h"
|
||||||
#include "util_double_list.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);
|
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,
|
drm_private uint64_t
|
||||||
uint64_t alignment, uint64_t base_required);
|
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,
|
drm_private void
|
||||||
uint64_t size);
|
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);
|
int amdgpu_query_gpu_info_init(amdgpu_device_handle dev);
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,8 @@ static void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr)
|
||||||
pthread_mutex_destroy(&mgr->bo_va_mutex);
|
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;
|
int ref;
|
||||||
ref = atomic_inc_return(&vamgr.refcount);
|
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;
|
return &vamgr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst,
|
drm_private void
|
||||||
struct amdgpu_bo_va_mgr *src)
|
amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst,
|
||||||
|
struct amdgpu_bo_va_mgr *src)
|
||||||
{
|
{
|
||||||
if (update_references(&(*dst)->refcount, NULL))
|
if (update_references(&(*dst)->refcount, NULL))
|
||||||
amdgpu_vamgr_deinit(*dst);
|
amdgpu_vamgr_deinit(*dst);
|
||||||
*dst = src;
|
*dst = src;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size,
|
drm_private uint64_t
|
||||||
uint64_t alignment, uint64_t base_required)
|
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;
|
struct amdgpu_bo_va_hole *hole, *n;
|
||||||
uint64_t offset = 0, waste = 0;
|
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;
|
return offset;
|
||||||
}
|
}
|
||||||
|
|
||||||
void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr,
|
drm_private void
|
||||||
uint64_t va, uint64_t size)
|
amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, uint64_t size)
|
||||||
{
|
{
|
||||||
struct amdgpu_bo_va_hole *hole;
|
struct amdgpu_bo_va_hole *hole;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue