aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSabre Shao2015-07-09 00:50:36 -0500
committerAlex Deucher2015-08-05 12:47:52 -0500
commit23fab59ba56233cd7142d43eace9348b9f5d72c2 (patch)
tree1f9d75be35ecdfa6eb7c10149816656ca81a8afc /amdgpu/amdgpu_internal.h
parent5b01908d1c1f94700e68381afe948045d1ef54a1 (diff)
downloadexternal-libdrm-23fab59ba56233cd7142d43eace9348b9f5d72c2.tar.gz
external-libdrm-23fab59ba56233cd7142d43eace9348b9f5d72c2.tar.xz
external-libdrm-23fab59ba56233cd7142d43eace9348b9f5d72c2.zip
amdgpu: add va allocation intefaces
Two new interfaces are added to support client request for allocate virtual address without physical memory committed to. The virtual address space can be managed by client itself. Signed-off-by: Sabre Shao <Sabre.Shao@amd.com> Signed-off-by: Ken Wang <Qingqing.Wang@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_internal.h')
-rw-r--r--amdgpu/amdgpu_internal.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/amdgpu/amdgpu_internal.h b/amdgpu/amdgpu_internal.h
index 8e6fbf40..e35923ff 100644
--- a/amdgpu/amdgpu_internal.h
+++ b/amdgpu/amdgpu_internal.h
@@ -58,6 +58,13 @@ struct amdgpu_bo_va_mgr {
58 uint32_t va_alignment; 58 uint32_t va_alignment;
59}; 59};
60 60
61struct amdgpu_va {
62 amdgpu_device_handle dev;
63 uint64_t address;
64 uint64_t size;
65 enum amdgpu_gpu_va_range range;
66};
67
61struct amdgpu_device { 68struct amdgpu_device {
62 atomic_t refcount; 69 atomic_t refcount;
63 int fd; 70 int fd;
@@ -124,7 +131,7 @@ struct amdgpu_bo_va_mgr* amdgpu_vamgr_get_global(struct amdgpu_device *dev);
124void amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, struct amdgpu_bo_va_mgr *src); 131void amdgpu_vamgr_reference(struct amdgpu_bo_va_mgr **dst, struct amdgpu_bo_va_mgr *src);
125 132
126uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size, 133uint64_t amdgpu_vamgr_find_va(struct amdgpu_bo_va_mgr *mgr, uint64_t size,
127 uint64_t alignment, uint64_t base_preferred); 134 uint64_t alignment, uint64_t base_required);
128 135
129void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va, 136void amdgpu_vamgr_free_va(struct amdgpu_bo_va_mgr *mgr, uint64_t va,
130 uint64_t size); 137 uint64_t size);