[PATCH libdrm] amdgpu: amdgpu_bo_inc_ref don't return dummy int

Yu, Qiang Qiang.Yu at amd.com
Mon Sep 3 10:50:53 UTC 2018


Sorry for not check this patch carefully, indeed a typo, will revert it.

Regards,
Qiang

________________________________________
From: Christian König <ckoenig.leichtzumerken at gmail.com>
Sent: Monday, September 3, 2018 6:40:33 PM
To: Michel Dänzer; Yu, Qiang
Cc: Zhang, Jerry; Koenig, Christian; amd-gfx at lists.freedesktop.org; Deng, Hui
Subject: Re: [PATCH libdrm] amdgpu: amdgpu_bo_inc_ref don't return dummy int

Am 03.09.2018 um 12:13 schrieb Michel Dänzer:
> On 2018-09-03 12:06 p.m., Qiang Yu wrote:
>> Signed-off-by: Qiang Yu <Qiang.Yu at amd.com>
>> ---
>>   amdgpu/amdgpu-symbol-check | 2 +-
>>   amdgpu/amdgpu.h            | 5 +----
>>   amdgpu/amdgpu_bo.c         | 3 +--
>>   3 files changed, 3 insertions(+), 7 deletions(-)
>>
>> diff --git a/amdgpu/amdgpu-symbol-check b/amdgpu/amdgpu-symbol-check
>> index 487610e..58646e8 100755
>> --- a/amdgpu/amdgpu-symbol-check
>> +++ b/amdgpu/amdgpu-symbol-check
>> @@ -15,8 +15,8 @@ amdgpu_bo_cpu_map
>>   amdgpu_bo_cpu_unmap
>>   amdgpu_bo_export
>>   amdgpu_bo_free
>> -amdgpu_bo_inc_ref
>>   amdgpu_bo_import
>> +amdgpu_bo_inc_ref
>>   amdgpu_bo_list_create
>>   amdgpu_bo_list_destroy
>>   amdgpu_bo_list_update
>> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
>> index e1f93f8..dc51659 100644
>> --- a/amdgpu/amdgpu.h
>> +++ b/amdgpu/amdgpu.h
>> @@ -725,13 +725,10 @@ int amdgpu_bo_free(amdgpu_bo_handle buf_handle);
>>    *
>>    * \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);
>> +void amdgpu_bo_inc_ref(amdgpu_bo_handle bo);
>>
>>   /**
>>    * Request CPU access to GPU accessable memory
>> diff --git a/amdgpu/amdgpu_bo.c b/amdgpu/amdgpu_bo.c
>> index dceab01..6a95929 100644
>> --- a/amdgpu/amdgpu_bo.c
>> +++ b/amdgpu/amdgpu_bo.c
>> @@ -438,10 +438,9 @@ int amdgpu_bo_free(amdgpu_bo_handle buf_handle)
>>      return 0;
>>   }
>>
>> -int amdgpu_bo_inc_ref(amdgpu_bo_handle bo)
>> +void 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)
>>
> Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

Added this and my rb as well and pushed it to master repository.

BTW: In the original patch there seems to be an unrelated change:
> - * Request CPU access to GPU accessible memory
...
> + * Request CPU access to GPU accessable memory

That doesn't looks correct to me and we should probably revert that.

Christian.


More information about the amd-gfx mailing list