drm_for_each...dge_in_chain(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

drm_for_each_bridge_in_chain β€” okay bestie, this one's a macro that literally iterates over all the bridges attached to an encoder. every single one. no skipping. periodt. πŸŒ‰


✨ SYNOPSIS ✨

drm_for_each_bridge_in_chain (encoder , bridge );

πŸŽ€ ARGUMENTS πŸŽ€

  • encoder β€” the encoder you're iterating bridges on. that's your main character right there. πŸ‘‘
  • bridge β€” a bridge pointer that gets updated at each iteration so it points to the current bridge. like a little cursor that keeps up with the vibe check. πŸ¦‹

🌸 DESCRIPTION 🌸

So the way this works: it iterates over every bridge present in the bridge chain attached to encoder. all of them. the whole squad. 🫢

And it's lowkey doing a lot for you behind the scenes β€” it automatically gets/puts the bridge reference while iterating (so the refcount stays immaculate, no leaks, no cap ✨), and it locks the encoder chain mutex so nobody can go modify the chain while you're mid-loop. it's giving "protected energy". πŸ’…

ngl, the locking part matters β€” don't go thinking you can just mutate the chain while you're iterating. that's not the vibe.

πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/drm/drm_bridge.h, plus the whole bridge family β€” enum drm_bridge_attach_flags(9), struct drm_bridge_funcs(9), struct drm_bridge_timings(9), enum drm_bridge_ops(9), struct drm_bridge(9), devm_drm_bridge_alloc(9), drm_bridge_get_current_state(9), drm_bridge_get_next_bridge(9), drm_bridge_get_prev_bridge(9), drm_bridge_chain_get_first_bridge(9), drm_bridge_chain_get_last_bridge(9), and its sibling-in-chain drm_for_each_bridge_in_chain_from(9). 🧚


that's the whole lore, bestie β€” this page came from ./include/drm and it's dated October 2026, so go forth and iterate responsibly πŸ˜­πŸ’–

πŸ“¦ where this page comes from