All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
@ 2018-09-03  6:55 Qiang Yu
       [not found] ` <1535957709-26008-1-git-send-email-Qiang.Yu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Qiang Yu @ 2018-09-03  6:55 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Qiang Yu, Christian König, Hui Deng

For Pro OGL be able to work with upstream libdrm.

Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
Reviewed-by: Christian König <christian.koenig@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
diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
index a8c353c..e1f93f8 100644
--- a/amdgpu/amdgpu.h
+++ b/amdgpu/amdgpu.h
@@ -721,7 +721,20 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
 int amdgpu_bo_free(amdgpu_bo_handle buf_handle);
 
 /**
- * Request CPU access to GPU accessible memory
+ * Increase the reference count of a buffer object
+ *
+ * \param   bo - \c [in]  Buffer object handle to increase the reference count
+ *
+ * \return   0 on success\n
+ *          <0 - Negative POSIX Error code
+ *
+ * \sa amdgpu_bo_alloc(), amdgpu_bo_free()
+ *
+*/
+int amdgpu_bo_inc_ref(amdgpu_bo_handle bo);
+
+/**
+ * Request CPU access to GPU accessable memory
  *
  * \param   buf_handle - \c [in] Buffer handle
  * \param   cpu        - \c [out] CPU address to be used for access
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;
+}
+
 int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu)
 {
 	union drm_amdgpu_gem_mmap args;
-- 
1.9.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
       [not found] ` <1535957709-26008-1-git-send-email-Qiang.Yu-5C7GfCeVMHo@public.gmane.org>
@ 2018-09-03  7:18   ` Zhang, Jerry (Junwei)
       [not found]     ` <5B8CE036.8050102-5C7GfCeVMHo@public.gmane.org>
  2018-09-03  9:46   ` Michel Dänzer
  1 sibling, 1 reply; 7+ messages in thread
From: Zhang, Jerry (Junwei) @ 2018-09-03  7:18 UTC (permalink / raw)
  To: Qiang Yu, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Christian König, Hui Deng

On 09/03/2018 02:55 PM, Qiang Yu wrote:
> For Pro OGL be able to work with upstream libdrm.
>
> Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
> Reviewed-by: Christian König <christian.koenig@amd.com>

I'm fine with that, not sure if mesa is going to use that as well.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>

Regards,
Jerry

> ---
>   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
> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
> index a8c353c..e1f93f8 100644
> --- a/amdgpu/amdgpu.h
> +++ b/amdgpu/amdgpu.h
> @@ -721,7 +721,20 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
>   int amdgpu_bo_free(amdgpu_bo_handle buf_handle);
>
>   /**
> - * Request CPU access to GPU accessible memory
> + * Increase the reference count of a buffer object
> + *
> + * \param   bo - \c [in]  Buffer object handle to increase the reference count
> + *
> + * \return   0 on success\n
> + *          <0 - Negative POSIX Error code
> + *
> + * \sa amdgpu_bo_alloc(), amdgpu_bo_free()
> + *
> +*/
> +int amdgpu_bo_inc_ref(amdgpu_bo_handle bo);
> +
> +/**
> + * Request CPU access to GPU accessable memory
>    *
>    * \param   buf_handle - \c [in] Buffer handle
>    * \param   cpu        - \c [out] CPU address to be used for access
> 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;
> +}
> +
>   int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu)
>   {
>   	union drm_amdgpu_gem_mmap args;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
       [not found]     ` <5B8CE036.8050102-5C7GfCeVMHo@public.gmane.org>
@ 2018-09-03  8:03       ` Yu, Qiang
       [not found]         ` <BY2PR12MB0243586F3EAAD25B3A2308AC8F0C0-K//h7OWB4q7MW+x49lsN/QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Yu, Qiang @ 2018-09-03  8:03 UTC (permalink / raw)
  To: Zhang, Jerry, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Koenig, Christian, Deng, Hui

Thanks Jerry.

Hi Christian,

This is an old patch back to 2016 reviewed in hybrid list. If you are OK with it,
would you please submit it to upstream?

Thanks,
Qiang

________________________________________
From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Zhang, Jerry (Junwei) <Jerry.Zhang@amd.com>
Sent: Monday, September 3, 2018 3:18:14 PM
To: Yu, Qiang; amd-gfx@lists.freedesktop.org
Cc: Koenig, Christian; Deng, Hui
Subject: Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.

On 09/03/2018 02:55 PM, Qiang Yu wrote:
> For Pro OGL be able to work with upstream libdrm.
>
> Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
> Reviewed-by: Christian König <christian.koenig@amd.com>

I'm fine with that, not sure if mesa is going to use that as well.

Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>

Regards,
Jerry

> ---
>   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
> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
> index a8c353c..e1f93f8 100644
> --- a/amdgpu/amdgpu.h
> +++ b/amdgpu/amdgpu.h
> @@ -721,7 +721,20 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
>   int amdgpu_bo_free(amdgpu_bo_handle buf_handle);
>
>   /**
> - * Request CPU access to GPU accessible memory
> + * Increase the reference count of a buffer object
> + *
> + * \param   bo - \c [in]  Buffer object handle to increase the reference count
> + *
> + * \return   0 on success\n
> + *          <0 - Negative POSIX Error code
> + *
> + * \sa amdgpu_bo_alloc(), amdgpu_bo_free()
> + *
> +*/
> +int amdgpu_bo_inc_ref(amdgpu_bo_handle bo);
> +
> +/**
> + * Request CPU access to GPU accessable memory
>    *
>    * \param   buf_handle - \c [in] Buffer handle
>    * \param   cpu        - \c [out] CPU address to be used for access
> 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;
> +}
> +
>   int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu)
>   {
>       union drm_amdgpu_gem_mmap args;
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
       [not found]         ` <BY2PR12MB0243586F3EAAD25B3A2308AC8F0C0-K//h7OWB4q7MW+x49lsN/QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
@ 2018-09-03  8:57           ` Christian König
       [not found]             ` <a62cdc40-80b4-6d51-b504-794fcc4a68c0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Christian König @ 2018-09-03  8:57 UTC (permalink / raw)
  To: Yu, Qiang, Zhang, Jerry, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW
  Cc: Koenig, Christian, Deng, Hui

Done.

Christian.

Am 03.09.2018 um 10:03 schrieb Yu, Qiang:
> Thanks Jerry.
>
> Hi Christian,
>
> This is an old patch back to 2016 reviewed in hybrid list. If you are OK with it,
> would you please submit it to upstream?
>
> Thanks,
> Qiang
>
> ________________________________________
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Zhang, Jerry (Junwei) <Jerry.Zhang@amd.com>
> Sent: Monday, September 3, 2018 3:18:14 PM
> To: Yu, Qiang; amd-gfx@lists.freedesktop.org
> Cc: Koenig, Christian; Deng, Hui
> Subject: Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
>
> On 09/03/2018 02:55 PM, Qiang Yu wrote:
>> For Pro OGL be able to work with upstream libdrm.
>>
>> Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
> I'm fine with that, not sure if mesa is going to use that as well.
>
> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>
> Regards,
> Jerry
>
>> ---
>>    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
>> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
>> index a8c353c..e1f93f8 100644
>> --- a/amdgpu/amdgpu.h
>> +++ b/amdgpu/amdgpu.h
>> @@ -721,7 +721,20 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
>>    int amdgpu_bo_free(amdgpu_bo_handle buf_handle);
>>
>>    /**
>> - * Request CPU access to GPU accessible memory
>> + * Increase the reference count of a buffer object
>> + *
>> + * \param   bo - \c [in]  Buffer object handle to increase the reference count
>> + *
>> + * \return   0 on success\n
>> + *          <0 - Negative POSIX Error code
>> + *
>> + * \sa amdgpu_bo_alloc(), amdgpu_bo_free()
>> + *
>> +*/
>> +int amdgpu_bo_inc_ref(amdgpu_bo_handle bo);
>> +
>> +/**
>> + * Request CPU access to GPU accessable memory
>>     *
>>     * \param   buf_handle - \c [in] Buffer handle
>>     * \param   cpu        - \c [out] CPU address to be used for access
>> 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;
>> +}
>> +
>>    int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu)
>>    {
>>        union drm_amdgpu_gem_mmap args;
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
       [not found]             ` <a62cdc40-80b4-6d51-b504-794fcc4a68c0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2018-09-03  8:58               ` Yu, Qiang
  0 siblings, 0 replies; 7+ messages in thread
From: Yu, Qiang @ 2018-09-03  8:58 UTC (permalink / raw)
  To: Zhang, Jerry, amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Koenig,
	Christian
  Cc: Deng, Hui

Thanks.

Regards,
Qiang

________________________________________
From: Christian König <ckoenig.leichtzumerken@gmail.com>
Sent: Monday, September 3, 2018 4:57:39 PM
To: Yu, Qiang; Zhang, Jerry; amd-gfx@lists.freedesktop.org
Cc: Koenig, Christian; Deng, Hui
Subject: Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.

Done.

Christian.

Am 03.09.2018 um 10:03 schrieb Yu, Qiang:
> Thanks Jerry.
>
> Hi Christian,
>
> This is an old patch back to 2016 reviewed in hybrid list. If you are OK with it,
> would you please submit it to upstream?
>
> Thanks,
> Qiang
>
> ________________________________________
> From: amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Zhang, Jerry (Junwei) <Jerry.Zhang@amd.com>
> Sent: Monday, September 3, 2018 3:18:14 PM
> To: Yu, Qiang; amd-gfx@lists.freedesktop.org
> Cc: Koenig, Christian; Deng, Hui
> Subject: Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
>
> On 09/03/2018 02:55 PM, Qiang Yu wrote:
>> For Pro OGL be able to work with upstream libdrm.
>>
>> Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
>> Reviewed-by: Christian König <christian.koenig@amd.com>
> I'm fine with that, not sure if mesa is going to use that as well.
>
> Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
>
> Regards,
> Jerry
>
>> ---
>>    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
>> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
>> index a8c353c..e1f93f8 100644
>> --- a/amdgpu/amdgpu.h
>> +++ b/amdgpu/amdgpu.h
>> @@ -721,7 +721,20 @@ int amdgpu_find_bo_by_cpu_mapping(amdgpu_device_handle dev,
>>    int amdgpu_bo_free(amdgpu_bo_handle buf_handle);
>>
>>    /**
>> - * Request CPU access to GPU accessible memory
>> + * Increase the reference count of a buffer object
>> + *
>> + * \param   bo - \c [in]  Buffer object handle to increase the reference count
>> + *
>> + * \return   0 on success\n
>> + *          <0 - Negative POSIX Error code
>> + *
>> + * \sa amdgpu_bo_alloc(), amdgpu_bo_free()
>> + *
>> +*/
>> +int amdgpu_bo_inc_ref(amdgpu_bo_handle bo);
>> +
>> +/**
>> + * Request CPU access to GPU accessable memory
>>     *
>>     * \param   buf_handle - \c [in] Buffer handle
>>     * \param   cpu        - \c [out] CPU address to be used for access
>> 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;
>> +}
>> +
>>    int amdgpu_bo_cpu_map(amdgpu_bo_handle bo, void **cpu)
>>    {
>>        union drm_amdgpu_gem_mmap args;
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
       [not found] ` <1535957709-26008-1-git-send-email-Qiang.Yu-5C7GfCeVMHo@public.gmane.org>
  2018-09-03  7:18   ` Zhang, Jerry (Junwei)
@ 2018-09-03  9:46   ` Michel Dänzer
       [not found]     ` <ff7f2575-7c8b-3083-d10a-7445bbaa6f14-otUistvHUpPR7s880joybQ@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: Michel Dänzer @ 2018-09-03  9:46 UTC (permalink / raw)
  To: Qiang Yu; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Hui Deng

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@amd.com>
> Reviewed-by: Christian König <christian.koenig@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
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function.
       [not found]     ` <ff7f2575-7c8b-3083-d10a-7445bbaa6f14-otUistvHUpPR7s880joybQ@public.gmane.org>
@ 2018-09-03  9:52       ` Yu, Qiang
  0 siblings, 0 replies; 7+ messages in thread
From: Yu, Qiang @ 2018-09-03  9:52 UTC (permalink / raw)
  To: Michel Dänzer; +Cc: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Deng, Hui


>>  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. :)
Oh, haven't notice this is in alphabetic order.

>>
>> +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?
Indeed no actual functionality, will prepare a patch for removing it.

Thanks,
Qiang

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-09-03  9:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03  6:55 [PATCH libdrm] amdgpu: add amdgpu_bo_inc_ref() function Qiang Yu
     [not found] ` <1535957709-26008-1-git-send-email-Qiang.Yu-5C7GfCeVMHo@public.gmane.org>
2018-09-03  7:18   ` Zhang, Jerry (Junwei)
     [not found]     ` <5B8CE036.8050102-5C7GfCeVMHo@public.gmane.org>
2018-09-03  8:03       ` Yu, Qiang
     [not found]         ` <BY2PR12MB0243586F3EAAD25B3A2308AC8F0C0-K//h7OWB4q7MW+x49lsN/QdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-09-03  8:57           ` Christian König
     [not found]             ` <a62cdc40-80b4-6d51-b504-794fcc4a68c0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-09-03  8:58               ` Yu, Qiang
2018-09-03  9:46   ` Michel Dänzer
     [not found]     ` <ff7f2575-7c8b-3083-d10a-7445bbaa6f14-otUistvHUpPR7s880joybQ@public.gmane.org>
2018-09-03  9:52       ` Yu, Qiang

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.