drm_mode_gamma_set_ioctl(9)
π drm_mode_gamma_set_ioctl(9) β a Kernel API Manual moment
okay bestie, so this is a page from the Kernel API Manual (yes, the drm_mode_gamma_set_ioctl(9) one, we stan a niche legend) and it's literally all about setting the gamma table. let's get into it β¨
πΈ NAME πΈ
drm_mode_gamma_set_ioctl β set the gamma table, that's the whole vibe π
β¨ SYNOPSIS β¨
int drm_mode_gamma_set_ioctl (struct drm_device *dev , void *data ,
struct drm_file *file_priv );
like, look at that signature. gorgeous. no notes. π
π«Ά ARGUMENTS π«Ά
devβ the DRM device, aka the main character π₯οΈdataβ the ioctl data, the little payload carrying the goods π¦file_privβ DRM file info, the receipts basically π§Ύ
π¦ DESCRIPTION π¦
So what it does: it sets the gamma table of a CRTC to the one that got passed in by the user. that's it, that's the job π
and if userspace is like "wait, how big is this table supposed to be??" β no stress, they can inquire the required gamma table size through drm_mode_gamma_get_ioctl. iykyk β¨
also, important: this one is called by the user via ioctl. so it's the userspace-to-kernel pipeline, fr fr.
π₯ RETURN π₯
- Zero on success π (we love a clean win)
- negative errno on failure π (it's giving error, but at least it's a proper errno)
π SEE ALSO π
the whole friend group, ok:
- the 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_crtc_legacy_gamma_set(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)
π quick vibe check: this page lives under ./drivers/gpu/drm, and it's dated October 2026 β so yeah, future energy, we love to see it π§
okay that's the whole page, go forth and set those gamma tables responsibly, 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