drm_crtc_legacy_gamma_set(9)
π drm_crtc_legacy_gamma_set(9) π
okay so bestie, welcome to another page of the Kernel API Manual β this one's all about drm_crtc_legacy_gamma_set, and honestly it's giving "vintage but still relevant" β¨
πΈ NAME πΈ
drm_crtc_legacy_gamma_set β set the legacy gamma correction table π¨
β SYNOPSIS β
int drm_crtc_legacy_gamma_set (struct drm_crtc *crtc , u16 *red , u16
*green , u16 *blue , u32 size , struct drm_modeset_acquire_ctx *ctx );
like, that's the whole vibe check right there π
π ARGUMENTS π
crtcβ the CRTC object π (the main character of this function, fr)redβ the red correction table πgreenβ the green correction table π§blueβ the blue correction table π¦sizeβ size of the tables, no capctxβ the lock acquire context π
π¦ DESCRIPTION π¦
So what does this actually do? It implements support for the legacy gamma correction table for drivers that have set drm_crtc_funcs.gamma_set β or that support color management through the DEGAMMA_LUT/GAMMA_LUT properties π like, both paths are valid, slay.
If you wanna know how atomic color management and gamma tables work in general, check out drm_crtc_enable_color_mgmt and the containing chapter β it's required reading, iykyk π
And here's the actual tea: this function sets the gamma using drm_crtc_funcs.gamma_set if set, or alternatively using the crtc color management properties. Two routes, one destination, iconic behavior fr fr π
π SEE ALSO π
the whole friend group showed up for this one, so let's give them all a shoutout π«Ά
- Kernel file
./drivers/gpu/drm/drm_color_mgmt.c overview(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_mode_gamma_set_ioctl(9)drm_mode_gamma_get_ioctl(9)drm_get_color_encoding_name(9)drm_get_color_range_name(9)drm_plane_create_color_properties(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)
and that's the whole page, bestie β go set some gamma tables, you've got this π
okay bye ily, this one came from ./drivers/gpu/drm and it's dated October 2026, and yeah the page name is literally drm_crtc_legacy_gamma_set(9) β iconic from start to finish, periodt πβ¨
π¦ 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