diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-02-08 13:02:56 +0100 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-04-03 10:11:24 +0200 |
commit | 4e369f25a942837454f1c127a7a440571af4f486 (patch) | |
tree | 0e0bea6b650bed3d6028063ad3d7486aa45496cd /amdgpu/amdgpu.h | |
parent | 18fbd7f0899d4e67a6902813a46be2983986c21c (diff) | |
download | libdrm-4e369f25a942837454f1c127a7a440571af4f486.tar.gz libdrm-4e369f25a942837454f1c127a7a440571af4f486.tar.bz2 libdrm-4e369f25a942837454f1c127a7a440571af4f486.zip |
amdgpu: add amdgpu_bo_va_op_raw
This variant allows the caller full control over flags and size, and
allows passing a NULL bo (for PRT support).
Cc: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Cc: Jerry Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'amdgpu/amdgpu.h')
-rw-r--r-- | amdgpu/amdgpu.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h index 7b26a04c..6b2ded83 100644 --- a/amdgpu/amdgpu.h +++ b/amdgpu/amdgpu.h @@ -1186,6 +1186,34 @@ int amdgpu_bo_va_op(amdgpu_bo_handle bo, uint32_t ops); /** + * VA mapping/unmapping for a buffer object or PRT region. + * + * This is not a simple drop-in extension for amdgpu_bo_va_op; instead, all + * parameters are treated "raw", i.e. size is not automatically aligned, and + * all flags must be specified explicitly. + * + * \param dev - \c [in] device handle + * \param bo - \c [in] BO handle (may be NULL) + * \param offset - \c [in] Start offset to map + * \param size - \c [in] Size to map + * \param addr - \c [in] Start virtual address. + * \param flags - \c [in] Supported flags for mapping/unmapping + * \param ops - \c [in] AMDGPU_VA_OP_MAP or AMDGPU_VA_OP_UNMAP + * + * \return 0 on success\n + * <0 - Negative POSIX Error code + * +*/ + +int amdgpu_bo_va_op_raw(amdgpu_device_handle dev, + amdgpu_bo_handle bo, + uint64_t offset, + uint64_t size, + uint64_t addr, + uint64_t flags, + uint32_t ops); + +/** * create semaphore * * \param sem - \c [out] semaphore handle |