for_each_new_plane_in_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… for_each_new_plane_in_state(9) β€” like, the actual Kernel API Manual, bestie ✨

okay okay okay so you found the for_each_new_plane_in_state(9) page, welcome, this one's a macro and honestly it's a vibe 🌸


πŸŽ€ NAME πŸŽ€

for_each_new_plane_in_state β€” loops over every plane in an atomic update, no cap πŸ’«


✨ SYNOPSIS ✨

for_each_new_plane_in_state (__state , plane , new_plane_state , __i );

πŸ¦‹ ARGUMENTS πŸ¦‹

  • __state β€” a struct drm_atomic_commit pointer. yes it's a pointer. it's the commit. love that for us πŸ’–
  • plane β€” a struct drm_plane iteration cursor, aka your little iterator bestie 🫢
  • new_plane_state β€” a struct drm_plane_state iteration cursor, but specifically for the new state πŸ”₯
  • __i β€” an int iteration cursor, and it's for macro-internal use only, so don't touch it, it's not your business πŸ™ˆ

🌈 DESCRIPTION 🌈

So the way this works: it iterates over all the planes in an atomic update, and it tracks only the new state. that's it, that's the whole personality ✨

Which is genuinely useful β€” like, icon behaviour β€” in enable functions, where we need the new state that the hardware should be in once the atomic commit operation has completed πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

Kernel file ./include/drm/drm_atomic.h β€” go read it, iykyk πŸ“–


and that's the whole page, periodt πŸ’…

k byeee, this came from ./include/drm, dated October 2026, and it's literally the for_each_new_plane_in_state(9) page, mwah 😽 πŸŽ€πŸ¦‹βœ¨
πŸ“¦ where this page comes from