[PATCH 2/3] drm: add define for Static_Metadata_Descriptor_ID
Simon Ser
contact at emersion.fr
Fri Apr 28 15:18:21 UTC 2023
On Friday, April 28th, 2023 at 15:12, Pekka Paalanen <ppaalanen at gmail.com> 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.
More information about the dri-devel
mailing list