for_each_old...ane_in_state(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

Okay bestie, welcome to the for_each_old...ane_in_state(9) page from the Kernel API Manual β€” the actual star of the show is for_each_oldnew_plane_in_state, and its whole job is to iterate over all planes in an atomic update. Iconic behavior, honestly.


✨ SYNOPSIS ✨

for_each_oldnew_plane_in_state (__state , plane , old_plane_state ,
       new_plane_state , __i );

πŸ’… ARGUMENTS πŸ’…

  • __state β€” a struct drm_atomic_commit pointer. That's your atomic commit vibe.
  • plane β€” a struct drm_plane iteration cursor.
  • old_plane_state β€” a struct drm_plane_state iteration cursor for the old state.
  • new_plane_state β€” a struct drm_plane_state iteration cursor for the new state.
  • __i β€” an int iteration cursor, strictly for macro-internal use.

πŸ¦‹ DESCRIPTION πŸ¦‹

So what does it do? It iterates over all planes in an atomic update, tracking both the old state and the new state at the same time. That's lowkey the whole point.

This is useful in places where you need to consider the state delta β€” for example, in atomic check functions. No cap, that's exactly the situation it's built for.


πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./include/drm/drm_atomic.h

The whole friend group is here, bestie:


That's the whole vibe πŸ’– This page lives in ./include/drm, dated October 2026, and the footer is still serving for_each_old...ane_in_state(9). Bye bestie, go iterate slayfully βœ¨πŸŽ€

πŸ“¦ where this page comes from