STRUCT HDR_METADATA_INFOFRAME(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct hdr_metadata_infoframe β€” HDR Metadata Infoframe Data πŸ’–

okay so first things first, bestie: this page lives in the Kernel API Manual, and the star of the show is struct hdr_metadata_infoframe(9) β€” literally the struct that carries HDR Metadata Infoframe Data. it's giving "small struct, big glow-up" energy and i'm obsessed. let's get into it ✨


🌸 SYNOPSIS 🌸

here's the whole vibe, character for character, don't touch a single byte:

struct hdr_metadata_infoframe {
    __u8 eotf;
    __u8 metadata_type;
    struct {
      __u16 x, y;
    } display_primaries[3];
    struct {
      __u16 x, y;
    } white_point;
    __u16 max_display_mastering_luminance;
    __u16 min_display_mastering_luminance;
    __u16 max_cll;
    __u16 max_fall;
 };

like. look at it. every field is a little main character 🫢


πŸŽ€ Members πŸŽ€

okay now the member-by-member breakdown, and yes we're doing all of them, i would never skip πŸ’…

  • eotf β€” the Electro-Optical Transfer Function (EOTF) used in the stream. that's the transfer function, bestie, that's what it is πŸ¦‹
  • metadata_type β€” Static_Metadata_Descriptor_ID. that's the descriptor ID, no notes.
  • display_primaries β€” the Color Primaries of the Data. these are coded as unsigned 16-bit values in units of 0.00002, where 0x0000 represents zero and 0xC350 represents 1.0000. and inside it:
    • display_primaries.x: X coordinate of color primary.
    • display_primaries.y: Y coordinate of color primary.

both coordinates accounted for, we stay thorough 🌈

  • white_point β€” the White Point of Colorspace Data. also coded as unsigned 16-bit values in units of 0.00002, where 0x0000 represents zero and 0xC350 represents 1.0000. and inside:
    • white_point.x: X coordinate of whitepoint of color primary.
    • white_point.y: Y coordinate of whitepoint of color primary.

yes the doc says "whitepoint of color primary", i'm quoting it exactly, don't come for me 😭

  • max_display_mastering_luminance β€” Max Mastering Display Luminance. coded as an unsigned 16-bit value in units of 1 cd/m2, where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2. big brightness energy πŸ”₯
  • min_display_mastering_luminance β€” Min Mastering Display Luminance. coded as an unsigned 16-bit value in units of 0.0001 cd/m2, where 0x0001 represents 0.0001 cd/m2 and 0xFFFF represents 6.5535 cd/m2. tiny units, huge precision, we respect it 🌸
  • max_cll β€” Max Content Light Level. coded as an unsigned 16-bit value in units of 1 cd/m2, where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
  • max_fall β€” Max Frame Average Light Level. coded as an unsigned 16-bit value in units of 1 cd/m2, where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.

✨ Description ✨

so what is this? it's the HDR Metadata Infoframe as per CTA 861.G spec, and the way this struct is expected to match that spec exactly? iconic. no cap, exact match only.

and userspace? userspace is expected to pass the metadata information as per the format described in this structure. that's the contract, bestie, sign it and slay πŸ’–


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, in order, all of them, here we go:

Kernel file ./include/uapi/drm/drm_mode.h, overview(9), struct drm_mode_modeinfo(9), struct drm_mode_get_plane(9), struct drm_mode_get_connector(9), struct drm_mode_property_enum(9), struct drm_mode_get_property(9), struct drm_mode_fb_cmd2(9), enum drm_colorop_type(9), enum drm_colorop_lut3d_interpolation_type(9), enum drm_colorop_lut1d_interpolation_type(9), struct drm_plane_size_hint(9), struct hdr_output_metadata(9), DRM_MODE_PAGE_FLIP_EVENT(9), DRM_MODE_PAGE_FLIP_ASYNC(9), DRM_MODE_PAGE_FLIP_FLAGS(9), struct drm_mode_create_dumb(9), DRM_MODE_ATOMIC_TEST_ONLY(9), DRM_MODE_ATOMIC_NONBLOCK(9), DRM_MODE_ATOMIC_ALLOW_MODESET(9), DRM_MODE_ATOMIC_FLAGS(9), struct drm_mode_create_blob(9), struct drm_mode_destroy_blob(9), struct drm_mode_create_lease(9), struct drm_mode_list_lessees(9), struct drm_mode_get_lease(9), struct drm_mode_revoke_lease(9), struct drm_mode_rect(9), struct drm_mode_closefb(9)

like i said. the whole group chat is in here 🫢


πŸ’€ tiny warning before you go: this page is from ./include/uapi/drm β€” that's the source path β€” and it's dated October 2026. it's a kernel API manual page for struct hdr_metadata_infoframe(9). that's the lore, i don't make the rules πŸ’œ

okay that's the whole page, go forth and set your max_cll correctly, bestie. mwah πŸŽ€πŸ’…βœ¨

πŸ“¦ where this page comes from