for_each_ol...mgr_in_state(9)
π« for_each_ol...mgr_in_state(9) π«
okay bestie, welcome to the Kernel API Manual β yes that's the whole manual name, we're fancy here π
and today's main character is a macro with a name so long the header literally gave up and wrote for_each_ol...mgr_in_state(9). no cap, that's the title. iconic behavior fr.
β¨ NAME β¨
for_each_old_mst_mgr_in_state β literally iterates over all DP MST topology managers in an atomic update. that's it, that's the whole vibe π¦
π SYNOPSIS π
for_each_old_mst_mgr_in_state (__state , mgr , old_state , __i );
yes the spacing is exactly like that, don't come for me, I'm copying it verbatim π«Ά
πΈ ARGUMENTS πΈ
__stateβ astruct drm_atomic_commitpointer. the atomic commit in question, your main character of the moment πmgrβ astruct drm_dp_mst_topology_mgr. this is the iteration cursor, aka the little guy that walks the list as you loop πold_stateβ astruct drm_dp_mst_topology_state, and it's the iteration cursor for the old state. important: it's the old one, we'll get to why π__iβ anintiteration cursor, and it's strictly for macro-internal use. like, do not touch it, it's not for you, it's the macro's private business π
π DESCRIPTION π
so this macro iterates over all the DRM DP MST topology managers in an atomic update, and β key detail β it only tracks the old state β¨
which is lowkey the whole point: this is useful in disable functions, where we need the old state that the hardware is still in. like, the hardware hasn't caught up yet, so you gotta look at where it's at right now, not where it's going. vibe check on the past, basically π°οΈπ
π SEE ALSO π
the kernel file ./include/drm/display/drm_dp_mst_helper.h β go read it, it's giving lore π
and then the whole friend group:
struct drm_dp_mst_port(9)struct drm_dp_mst_branch(9)struct drm_dp_mst_atomic_payload(9)struct drm_dp_mst_topology_state(9)struct drm_dp_mst_topology_mgr(9)enum drm_dp_mst_mode(9)__drm_dp_mst_state_iter_get(9)for_each_oldnew_mst_mgr_in_state(9)for_each_new_mst_mgr_in_state(9)
ok that's the page bestie, go forth and iterate over those old states responsibly π§ββοΈ
mwah π this has been the Kernel API Manual, live from ./include/drm/display, dated October 2026 β periodt. π
π¦ 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