drm_plane_c...r_properties(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_plane_c...r_properties β€” like, the whole color-properties vibe πŸ’…

okay so bestie, you know how every plane out here is just dying to have its own color settings? yeah. this is the function that hooks that up. it lives in the Kernel API Manual (very official, very demure) and honestly it ate. πŸŽ€


✨ NAME ✨

drm_plane_create_color_properties β€” the color-encoding-related plane properties maker. it's giving "i make the properties, you make it pretty." no cap. 🌈


πŸ¦‹ SYNOPSIS πŸ¦‹

int drm_plane_create_color_properties (struct drm_plane *plane , u32
supported_encodings , u32 supported_ranges , enum drm_color_encoding
default_encoding , enum drm_color_range default_range );

like, copy that exactly please, it's int returning and everything. periodt. ✨


πŸ’– ARGUMENTS πŸ’–

  • plane β€” your plane object, the main character of this whole situation. everything gets attached to her. πŸ‘‘
  • supported_encodings β€” a bitfield saying which color encodings are supported. one bit per encoding, that's the whole system, iconic. πŸŽ€
  • supported_ranges β€” a bitfield saying which color ranges are supported. (ngl the original page spells this one "bitfileld" and we simply have to respect the typo, it's hers now. πŸ™ˆ)
  • default_encoding β€” the default color encoding. the one she picks when nobody's choosing. πŸ’…
  • default_range β€” the default color range. same energy, different setting. πŸ¦‹

🌸 DESCRIPTION 🌸

so what she does is: create and attach plane-specific COLOR_ENCODING and COLOR_RANGE properties to plane. two properties. one plane. slay.

the supported encodings and ranges get passed in through the supported_encodings and supported_ranges bitmasks β€” like, that's how you tell her what's allowed. πŸ’–

and the rule for reading those bitmasks is genuinely so simple it's lowkey elegant: each bit set in the bitmask indicates that its number as enum value is supported. that's it. bit number equals enum value, if it's on, it's supported. iykyk. ⭐


🧚 SEE ALSO 🧚

the whole friend group, fr fr β€” not me listing every single one because every single one matters:

go read them. all of them. bestie homework. πŸ“šβœ¨


lowkey reminder: this page lives at ./drivers/gpu/drm and it's dated October 2026 β€” so yeah, future girl energy. πŸ’€πŸ«Ά

anyway that's the page, mwah, go attach some properties, you're gonna do amazing πŸ’œπŸŽ€βœ¨

πŸ“¦ where this page comes from