drm_mode_gamma_set_ioctl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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:


πŸ’€ 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