Re: [PATCH 2/3] drm: add define for Static_Metadata_Descriptor_ID

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Friday, April 28th, 2023 at 15:12, Pekka Paalanen <ppaalanen@xxxxxxxxx> wrote:

> the subject says "define" but this is an enum. No big deal, but the
> thing I started wondering is how I am going to use these in userspace.
> There is no #define I could test to know if I need to provide a
> fallback definition. What's the migration plan for userspace to start
> using this and patch 3?
> 
> Nevertheless, these are good to have.
> 
> Oh, is it a libdrm version check I should use?

Yeah, that's one way to do it. Another way would be cc.has_header_symbol().
The same kind of situation happened when struct hdr_output_metadata was
introduced.

I chose to use enums because they better group the different values and
document the intent. If I had gone for #defines, the docs would need to
either list each individual #define or refer to "DRM_HDR_EOTF_*" which
doesn't get linkified.




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux