#include <assert.h>
#include <pthread.h>
+
+#include "libdrm_macros.h"
#include "xf86atomic.h"
#include "amdgpu.h"
#include "util_double_list.h"
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);
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);
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;
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;