summaryrefslogtreecommitdiff
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-07-30 00:11:13 -0400
commit4e57068aa674b7ab4717c8ad354fcd5cf470c452 (patch)
tree93ce190d6eef27644eef56d062c1772e1b65903e
parentcd52c784220ea830a01470d138662b10c18849ec (diff)
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>
-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);