drm_plane_c...r_properties(9)
π 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:
- Kernel file
./drivers/gpu/drm/drm_color_mgmt.coverview(9) drm_color_ctm_s31_32_to_qm_n(9)drm_crtc_enable_color_mgmt(9)drm_mode_crtc_set_gamma_size(9)drm_crtc_supports_legacy_gamma(9)drm_crtc_legacy_gamma_set(9)drm_mode_gamma_set_ioctl(9)drm_mode_gamma_get_ioctl(9)drm_get_color_encoding_name(9)drm_get_color_range_name(9)drm_color_lut_check(9)drm_crtc_load_gamma_888(9)drm_crtc_load_gamma_565_from_888(9)drm_crtc_load_gamma_555_from_888(9)drm_crtc_fill_gamma_888(9)drm_crtc_fill_gamma_565(9)drm_crtc_fill_gamma_555(9)drm_crtc_load_palette_8(9)drm_crtc_fill_palette_332(9)drm_crtc_fill_palette_8(9)drm_color_lut32_check(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms