drm_crtc_enable_color_mgmt(9)
π drm_crtc_enable_color_mgmt(9) π
okay so you're in the Kernel API Manual, bestie, and today's main character is drm_crtc_enable_color_mgmt β a kernel function that's literally just here to turn on the color management properties for you. no cap, that's the whole vibe. β¨
πΈ NAME πΈ
drm_crtc_enable_color_mgmt β enable color management properties. that's it. that's the job. she enables. she manages colors. she serves. π
π¦ SYNOPSIS π¦
void drm_crtc_enable_color_mgmt (struct drm_crtc *crtc , uint
degamma_lut_size , bool has_ctm , uint gamma_lut_size );
yes it's one long line and yes she's a void β she returns nothing because she doesn't need to, she just does things and dips. π
β¨ ARGUMENTS β¨
crtcβ the DRM CRTC. like, the actual CRT Controller object you're doing all this color stuff to. the canvas. the moment. πΌοΈdegamma_lut_sizeβ the size of the degamma lut. and yes, that's the one before CSC, iykyk. πhas_ctmβ abool, bestie, so it's a yes/no situation: whether to attachctm_propertyfor the CSC matrix. true = attached, false = she's not coming to the party. πgamma_lut_sizeβ the size of the gamma lut, which lives after CSC. different side of the pipeline, still iconic. π
π DESCRIPTION π
so here's the tea β β this function is how the driver enables the color correction properties on a CRTC. and when she enables, she enables five properties, no cap:
- the 3 big ones userspace can actually set: degamma, csc, and gamma
- plus 2 size properties whose whole job is to inform userspace of the lut sizes π«Ά
and the best part? each of the properties are optional. very "come as you are" of her. the rules are:
- gamma and degamma properties are only attached if their size is not 0
ctm_propertyis only attached ifhas_ctmis true
π¨ vibe check: size0means no property, andhas_ctm = falsemeans no ctm property. she's not attaching things she wasn't asked to attach. periodt. π
π₯ SEE ALSO π₯
the whole friend group, fr fr β go read the kernel file ./drivers/gpu/drm/drm_color_mgmt.c plus all these lovelies:
overview(9)drm_color_ctm_s31_32_to_qm_n(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_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)
π§ okay that's the whole page!! this one came out of ./drivers/gpu/drm and it's dated October 2026 β stay hydrated, enable your color management, and slay your pipeline bestie ππ
π¦ 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