[PATCH libdrm 1/2] amdgpu: Add wrappers for AMDGPU_VM IOCTL.
Emil Velikov
emil.l.velikov at gmail.com
Fri Oct 27 08:52:25 UTC 2017
On 27 October 2017 at 01:15, Andrey Grodzovsky
<Andrey.Grodzovsky at amd.com> wrote:
> Change-Id: I7eafb85c1ca96d6d255f0183bed0ce4129746fe0
> Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky at amd.com>
> ---
> amdgpu/Makefile.sources | 1 +
> amdgpu/amdgpu.h | 20 +++++++++++++++++++
> amdgpu/amdgpu_vm.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 73 insertions(+)
> create mode 100644 amdgpu/amdgpu_vm.c
>
> diff --git a/amdgpu/Makefile.sources b/amdgpu/Makefile.sources
> index bc3abaa..498b64c 100644
> --- a/amdgpu/Makefile.sources
> +++ b/amdgpu/Makefile.sources
> @@ -6,6 +6,7 @@ LIBDRM_AMDGPU_FILES := \
> amdgpu_gpu_info.c \
> amdgpu_internal.h \
> amdgpu_vamgr.c \
> + amdgpu_vm.c \
> util_hash.c \
> util_hash.h \
> util_hash_table.c \
> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
> index ecc975f..07f2851 100644
> --- a/amdgpu/amdgpu.h
> +++ b/amdgpu/amdgpu.h
> @@ -1489,6 +1489,26 @@ void amdgpu_cs_chunk_fence_to_dep(struct amdgpu_cs_fence *fence,
> void amdgpu_cs_chunk_fence_info_to_data(struct amdgpu_cs_fence_info *fence_info,
> struct drm_amdgpu_cs_chunk_data *data);
>
> +/**
> + * Reserve VMID
> + * \param context - \c [in] GPU Context
> + * \param flags - \c [in] TBD
> + *
> + * \return 0 on success otherwise POSIX Error code
> +*/
> +int amdgpu_vm_alloc_reserved_vmid(amdgpu_context_handle context,
> + uint32_t flags);
> +
> +/**
> + * Free reserved VMID
> + * \param context - \c [in] GPU Context
> + * \param flags - \c [in] TBD
> + *
> + * \return 0 on success otherwise POSIX Error code
> +*/
> +int amdgpu_vm_free_reserved_vmid(amdgpu_context_handle context,
> + uint32_t flags);
> +
Andrey, don't forget to run make check. You'll see it flag a lovely error ;-)
-Emil
More information about the dri-devel
mailing list