for_each_old_crtc_in_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… for_each_old_crtc_in_state β€” Kernel API Manual ✨

okay so bestie, welcome to the for_each_old_crtc_in_state(9) page πŸŽ€ this one lives in the Kernel API Manual and honestly? it's giving "small macro, big main character energy" 🌈 let's get into it.


🌸 NAME 🌸

for_each_old_crtc_in_state β€” iterate over all CRTCs in an atomic update πŸ’–


✨ SYNOPSIS ✨

for_each_old_crtc_in_state (__state , crtc , old_crtc_state , __i );

like, that's the whole vibe. four things go in, magic comes out 🫢


πŸŽ€ ARGUMENTS πŸŽ€

  • __state β€” a struct drm_atomic_commit pointer. yes bestie, the whole atomic commit, that's the one πŸ‘‘
  • crtc β€” a struct drm_crtc iteration cursor. it's your little "where am i right now" buddy as you loop 🌸
  • old_crtc_state β€” a struct drm_crtc_state iteration cursor for the old state. the before pics, if you will πŸ“Έ
  • __i β€” an int iteration cursor, for macro-internal use. bestie do NOT touch this one, it's not for you, it's the macro's own business πŸ™ˆ (iykyk)

πŸ’œ DESCRIPTION πŸ’œ

so what does this actually do? it iterates over all CRTCs in an atomic update, tracking only the old state ✨ like, exclusively the old one, no new-state crumbs, periodt.

and why do we care? because this is genuinely useful in disable functions πŸ”₯ β€” those are the spots where we need the old state that the hardware is still in. the hardware hasn't caught up yet, so the old state is the truth we're working with πŸ’…

fr fr, "old state" here isn't nostalgia, it's literally what the hardware is still doing. respect it 😌

πŸ¦‹ SEE ALSO πŸ¦‹

here's the whole friend group, no cap β€” everyone in this list is a real one πŸ’–


🧚 sign-off 🧚

this page ships from ./include/drm 🌸 and the version stamp says October 2026 ⭐ so that's the era we're in, bestie. the page title is for_each_old_crtc_in_state(9), and that's a wrap πŸ’…βœ¨ go iterate something iconic πŸ‘‘πŸ’–

πŸ“¦ where this page comes from