summaryrefslogtreecommitdiff
path: root/amdgpu
diff options
context:
space:
mode:
authorJammy Zhou <Jammy.Zhou@amd.com>2015-07-16 10:29:58 +0800
committerAlex Deucher <alexander.deucher@amd.com>2015-08-05 13:47:52 -0400
commit95d0f35dafff6c588da47c28332c252881f2e07c (patch)
treed87cc97fe1a9f6b681b721649aa878826ecc63fd /amdgpu
parent926c80568691e04abdfcd21b6e9be61331e95b03 (diff)
downloadlibdrm-95d0f35dafff6c588da47c28332c252881f2e07c.tar.gz
libdrm-95d0f35dafff6c588da47c28332c252881f2e07c.tar.bz2
libdrm-95d0f35dafff6c588da47c28332c252881f2e07c.zip
amdgpu: add flags parameter for amdgpu_va_range_alloc
The flags is added for extensibility to cover some special requirements in the future, i.e, request VA range in the first 4GB of address space Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'amdgpu')
-rw-r--r--amdgpu/amdgpu.h4
-rw-r--r--amdgpu/amdgpu_vamgr.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index 125377c2..bc6751ae 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -1114,6 +1114,7 @@ int amdgpu_read_mm_registers(amdgpu_device_handle dev, unsigned dword_offset,
* \param va_base_allocated - \c [out] On return: Allocated VA base to be used
* by client.
* \param va_range_handle - \c [out] On return: Handle assigned to allocation
+ * \param flags - \c [in] flags for special VA range
*
* \return 0 on success\n
* >0 - AMD specific error code\n
@@ -1135,7 +1136,8 @@ int amdgpu_va_range_alloc(amdgpu_device_handle dev,
uint64_t va_base_alignment,
uint64_t va_base_required,
uint64_t *va_base_allocated,
- amdgpu_va_handle *va_range_handle);
+ amdgpu_va_handle *va_range_handle,
+ uint64_t flags);
/**
* Free previously allocated virtual address range
diff --git a/amdgpu/amdgpu_vamgr.c b/amdgpu/amdgpu_vamgr.c
index d6ec9b4f..ced4f4fd 100644
--- a/amdgpu/amdgpu_vamgr.c
+++ b/amdgpu/amdgpu_vamgr.c
@@ -242,7 +242,8 @@ int amdgpu_va_range_alloc(amdgpu_device_handle dev,
uint64_t va_base_alignment,
uint64_t va_base_required,
uint64_t *va_base_allocated,
- amdgpu_va_handle *va_range_handle)
+ amdgpu_va_handle *va_range_handle,
+ uint64_t flags)
{
va_base_alignment = MAX2(va_base_alignment, dev->vamgr->va_alignment);
size = ALIGN(size, vamgr.va_alignment);