[PATCH libdrm] amdgpu: add amdgpu_bo_handle_type_kms_noimport

Marek Olšák maraeo at gmail.com
Thu Jul 12 02:41:33 UTC 2018


On Wed, Jul 11, 2018 at 10:09 PM, zhoucm1 <zhoucm1 at amd.com> wrote:
>
>
> On 2018年07月12日 08:47, Marek Olšák wrote:
>>
>> From: Marek Olšák <marek.olsak at amd.com>
>
> less patch comment to describe why amdgpu_bo_handle_type_kms doesn't meet
> requriement and what patch does.

The comment in amdgpu.h describes it well. (at least I hope so)

> less Signed-off-by.

Not needed for libdrm as far as I know, but some people add it anyway.

>
>>
>> ---
>>   amdgpu/amdgpu.h    | 7 ++++++-
>>   amdgpu/amdgpu_bo.c | 4 ++++
>>   2 files changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/amdgpu/amdgpu.h b/amdgpu/amdgpu.h
>> index 36f91058..be83b457 100644
>> --- a/amdgpu/amdgpu.h
>> +++ b/amdgpu/amdgpu.h
>> @@ -77,21 +77,26 @@ struct drm_amdgpu_info_hw_ip;
>>    *
>>   */
>>   enum amdgpu_bo_handle_type {
>>         /** GEM flink name (needs DRM authentication, used by DRI2) */
>>         amdgpu_bo_handle_type_gem_flink_name = 0,
>>         /** KMS handle which is used by all driver ioctls */
>>         amdgpu_bo_handle_type_kms = 1,
>>         /** DMA-buf fd handle */
>> -       amdgpu_bo_handle_type_dma_buf_fd = 2
>> +       amdgpu_bo_handle_type_dma_buf_fd = 2,
>> +
>> +       /** KMS handle, but re-importing as a DMABUF handle through
>> +        *  drmPrimeHandleToFD is forbidden. (Glamor does that)
>> +        */
>> +       amdgpu_bo_handle_type_kms_noimport = 3,
>
> I'm always curious that these enum members are lowercase, could we change
> them to uppercase by this time?

Existing open source projects #including amdgpu.h shouldn't fail
compilation with any newer libdrm, which limits us as to what we can
change in amdgpu.h.

Marek


More information about the amd-gfx mailing list