drm_atomic_s...ode_for_crtc(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_atomic_s...ode_for_crtc(9) β€” like, the whole vibe

okay so bestie, we're in the Kernel API Manual today and this page is genuinely iconic β€” it's drm_atomic_set_mode_for_crtc, and no cap, it's giving "small function, big responsibilities" energy. ✨


🌸 NAME 🌸

drm_atomic_set_mode_for_crtc β€” set mode for CRTC. that's it, that's the whole name, slay. πŸ’–


πŸŽ€ SYNOPSIS πŸŽ€

int drm_atomic_set_mode_for_crtc (struct drm_crtc_state *state , const
       struct drm_display_mode *mode );

like, look at her. two args, one int coming back. main character energy fr fr. πŸ¦‹


✨ ARGUMENTS ✨

  • state β€” the CRTC whose incoming state to update 🫢 so like, the thing you're about to change
  • mode β€” kernel-internal mode to use for the CRTC, or NULL to disable πŸ‘‘ yep, NULL is valid and it means "turn it off, bestie"

πŸ’œ DESCRIPTION πŸ’œ

Set a mode β€” and heads up, this one originates from the kernel, not from userspace, iykyk β€” on the desired CRTC state, and update the enable property while you're at it. 🌈

so like: pick your CRTC state, hand it a mode, and the enable property gets updated as part of the deal. two birds, one slay. πŸ’…


πŸ”₯ RETURN πŸ”₯

Zero on success, error code on failure. and the very important glow-up detail: it cannot return -EDEADLK. ⭐ like, not even possible. don't @ me.


πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/gpu/drm/drm_atomic_uapi.c overview(9) πŸ“
  • drm_atomic_set_mode_prop_for_crtc(9)
  • drm_atomic_set_crtc_for_plane(9)
  • drm_atomic_set_fb_for_plane(9)
  • drm_atomic_set_colorop_for_plane(9)
  • drm_atomic_set_crtc_for_connector(9)
  • explicit fencing properties(9) 🧚

lowkey a whole friend group of atomic setters, and this one's the mode-setting queen πŸ‘‘

and that's the page, bestie!! πŸ“ this lil baddie lives over in ./drivers/gpu/drm, dated October 2026 β€” go read the whole kernel API manual, it's a vibe. πŸ’€πŸŒΈπŸ’–

πŸ“¦ where this page comes from