for_each_ne...rop_in_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌈 for_each_new_colorop_in_state(9) πŸ’…

okay so bestie, welcome to the Kernel API Manual ✨ β€” yes this is a real macro in the kernel and yes it's giving main character energy. Sit down, grab a boba, we're iterating πŸ“


✨ NAME ✨

for_each_new_colorop_in_state β€” iterate over all colorops in an atomic update πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

for_each_new_colorop_in_state (__state , colorop , new_colorop_state ,
__i );

like, that's the whole vibe. four args, one macro, periodt πŸ’…


🌸 ARGUMENTS 🌸

  • __state β€” a struct drm_atomic_commit pointer. this is your main character of the whole operation, the atomic update itself ✨
  • colorop β€” a struct drm_colorop iteration cursor. it's the little guy that walks through every colorop, one at a time πŸšΆβ€β™€οΈ
  • new_colorop_state β€” a struct drm_colorop_state iteration cursor, but for the new state. yes the new one, keep up bestie πŸ’–
  • __i β€” an int iteration cursor, and it's for macro-internal use only πŸ™ˆ don't touch it, don't look at it, it's not for you

πŸ’« DESCRIPTION πŸ’«

So here's the tea β˜• β€” this macro iterates over all colorops in an atomic update, and while it's doing that it also tracks the new state for you. Obsessed, honestly.

The way that's useful: it's for places where the state delta actually needs to be considered πŸ‘€ β€” for example, in atomic check functions. Like, if you need to know what changed, not just what is, this is your girl 🫢


πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./include/drm/drm_atomic.h β€” and then the whole friend group, no cap πŸ«‚


aaaand that's the page bestie, you ate that πŸ’…βœ¨ this lil masterpiece lives in ./include/drm, came to you courtesy of the Kernel API Manual, and it's dated October 2026 πŸ—“οΈπŸ’œ go forth and iterate, icon πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from