aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSabre Shao2015-07-09 00:53:24 -0500
committerAlex Deucher2015-08-05 12:47:52 -0500
commit12802da74f0e480bbde5a11df689329910893e87 (patch)
treecfeb02aff684d0227e8b3a84cb6e8b054b9b1cf6 /amdgpu/amdgpu_vamgr.c
parent23fab59ba56233cd7142d43eace9348b9f5d72c2 (diff)
downloadexternal-libgbm-12802da74f0e480bbde5a11df689329910893e87.tar.gz
external-libgbm-12802da74f0e480bbde5a11df689329910893e87.tar.xz
external-libgbm-12802da74f0e480bbde5a11df689329910893e87.zip
amdgpu: add va range query interface
amdgpu_va_range_query interface is added so that client can query va range supported by specific device. Signed-off-by: Sabre Shao <Sabre.Shao@amd.com> Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Diffstat (limited to 'amdgpu/amdgpu_vamgr.c')
-rw-r--r--amdgpu/amdgpu_vamgr.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c
index faffba20..d6ec9b4f 100644
--- a/amdgpu/amdgpu_vamgr.c
+++ b/amdgpu/amdgpu_vamgr.c
@@ -31,6 +31,17 @@
31 31
32static struct amdgpu_bo_va_mgr vamgr = {{0}}; 32static struct amdgpu_bo_va_mgr vamgr = {{0}};
33 33
34int amdgpu_va_range_query(amdgpu_device_handle dev,
35 enum amdgpu_gpu_va_range type, uint64_t *start, uint64_t *end)
36{
37 if (type == amdgpu_gpu_va_range_general) {
38 *start = dev->dev_info.virtual_address_offset;
39 *end = dev->dev_info.virtual_address_max;
40 return 0;
41 }
42 return -EINVAL;
43}
44
34static void amdgpu_vamgr_init(struct amdgpu_bo_va_mgr *mgr, struct amdgpu_device *dev) 45static void amdgpu_vamgr_init(struct amdgpu_bo_va_mgr *mgr, struct amdgpu_device *dev)
35{ 46{
36 mgr->va_offset = dev->dev_info.virtual_address_offset; 47 mgr->va_offset = dev->dev_info.virtual_address_offset;