summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJammy Zhou <Jammy.Zhou@amd.com>2015-07-16 10:29:58 +0800
committerMarek Olšák <marek.olsak@amd.com>2015-07-22 13:53:25 +0200
commit8e99594e381a09d81a8f9bcc35e0687fbb7b9e68 (patch)
tree8e05e263b9bcc1649c8fb376d91a7f9c209149d3
parent2665ac6154bb4128fe541463b3b3a826b5b0ea8c (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);