[PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
Michel Dänzer
michel at daenzer.net
Mon Sep 3 09:46:07 UTC 2018
On 2018-09-03 8:55 a.m., Qiang Yu wrote:
> For Pro OGL be able to work with upstream libdrm.
>
> Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
> Reviewed-by: Christian König <christian.koenig at amd.com>
> ---
> amdgpu/amdgpu-symbol-check | 1 +
> amdgpu/amdgpu.h | 15 ++++++++++++++-
> amdgpu/amdgpu_bo.c | 6 ++++++
> 3 files changed, 21 insertions(+), 1 deletion(-)
>
> diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check
> index b5e4fe6..487610e 100755
> --- a/amdgpu/amdgpu-symbol-check
> +++ b/amdgpu/amdgpu-symbol-check
> @@ -15,6 +15,7 @@ amdgpu_bo_cpu_map
> amdgpu_bo_cpu_unmap
> amdgpu_bo_export
> amdgpu_bo_free
> +amdgpu_bo_inc_ref
> amdgpu_bo_import
> amdgpu_bo_list_create
> amdgpu_bo_list_destroy
Thanks for remembering to add the symbol here, but amdgpu_bo_inc_ref
goes after amdgpu_bo_import in lexical order. :)
> diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
> index a2fc525..dceab01 100644
> --- a/amdgpu/amdgpu_bo.c
> +++ b/amdgpu/amdgpu_bo.c
> @@ -438,6 +438,12 @@ int amdgpu_bo_free(amdgpu_bo_handle buf_handle)
> return 0;
> }
>
> +int amdgpu_bo_inc_ref(amdgpu_bo_handle bo)
> +{
> + atomic_inc(&bo->refcount);
> + return 0;
> +}
What's the point of having a non-void return value that's always 0?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the amd-gfx
mailing list