aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'amdgpu/amdgpu_internal.h')
-rw-r--r--amdgpu/amdgpu_internal.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index 4b07aff8..3ce0969e 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -66,6 +66,7 @@ struct amdgpu_va {
66 uint64_t address; 66 uint64_t address;
67 uint64_t size; 67 uint64_t size;
68 enum amdgpu_gpu_va_range range; 68 enum amdgpu_gpu_va_range range;
69 struct amdgpu_bo_va_mgr *vamgr;
69}; 70};
70 71
71struct amdgpu_device { 72struct amdgpu_device {
@@ -83,7 +84,10 @@ struct amdgpu_device {
83 pthread_mutex_t bo_table_mutex; 84 pthread_mutex_t bo_table_mutex;
84 struct drm_amdgpu_info_device dev_info; 85 struct drm_amdgpu_info_device dev_info;
85 struct amdgpu_gpu_info info; 86 struct amdgpu_gpu_info info;
87 /** The global VA manager for the whole virtual address space */
86 struct amdgpu_bo_va_mgr *vamgr; 88 struct amdgpu_bo_va_mgr *vamgr;
89 /** The VA manager for the 32bit address space */
90 struct amdgpu_bo_va_mgr *vamgr_32;
87}; 91};
88 92
89struct amdgpu_bo { 93struct amdgpu_bo {
@@ -128,6 +132,11 @@ drm_private void
128amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, 132amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst,
129 struct amdgpu_bo_va_mgr *src); 133 struct amdgpu_bo_va_mgr *src);
130 134
135drm_private void amdgpu_vamgr_init(struct amdgpu_bo_va_mgr *mgr, uint64_t start,
136 uint64_t max, uint64_t alignment);
137
138drm_private void amdgpu_vamgr_deinit(struct amdgpu_bo_va_mgr *mgr);
139
131drm_private uint64_t 140drm_private uint64_t
132amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, 141amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size,
133 uint64_t alignment, uint64_t base_required); 142 uint64_t alignment, uint64_t base_required);