for_each_new_plane_in_state(9)
π 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β astruct drm_atomic_commitpointer. yes it's a pointer. it's the commit. love that for us πplaneβ astruct drm_planeiteration cursor, aka your little iterator bestie π«Άnew_plane_stateβ astruct drm_plane_stateiteration cursor, but specifically for the new state π₯__iβ anintiteration 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 π
struct drm_crtc_commit(9)struct drm_private_state_funcs(9)struct drm_private_obj(9)drm_for_each_privobj(9)struct drm_private_state(9)struct drm_atomic_commit(9)drm_crtc_commit_get(9)drm_crtc_commit_put(9)drm_atomic_commit_get(9)drm_atomic_commit_put(9)drm_atomic_get_old_crtc_state(9)drm_atomic_get_new_crtc_state(9)drm_atomic_get_old_plane_state(9)drm_atomic_get_new_plane_state(9)drm_atomic_get_old_connector_state(9)drm_atomic_get_new_connector_state(9)__drm_atomic_get_current_plane_state(9)for_each_oldnew_connector_in_state(9)for_each_old_connector_in_state(9)for_each_new_connector_in_state(9)for_each_oldnew_crtc_in_state(9)for_each_old_crtc_in_state(9)for_each_new_crtc_in_state(9)for_each_oldnew_colorop_in_state(9)for_each_new_colorop_in_state(9)for_each_oldnew_plane_in_state(9)for_each_oldnew_plane_in_state_reverse(9)for_each_new_plane_in_state_reverse(9)for_each_old_plane_in_state(9)for_each_oldnew_private_obj_in_state(9)for_each_old_private_obj_in_state(9)for_each_new_private_obj_in_state(9)drm_atomic_crtc_needs_modeset(9)drm_atomic_crtc_effectively_active(9)struct drm_bus_cfg(9)struct drm_bridge_state(9)
and that's the whole page, periodt π
k byeee, this came from./include/drm, dated October 2026, and it's literally thefor_each_new_plane_in_state(9)page, mwah π½ ππ¦β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms