drm_mm_for_each_hole(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME β€” drm_mm_for_each_hole(9) πŸ’–

okay so welcome to the Kernel API Manual, bestie β€” this page is about drm_mm_for_each_hole, and it’s literally an iterator to walk over all holes. Slay. πŸ’…βœ¨


✨ SYNOPSIS ✨

drm_mm_for_each_hole (pos , mm , hole_start , hole_end );

πŸŽ€ ARGUMENTS πŸŽ€

  • pos β€” a drm_mm_node used internally to track progress πŸ‘€
  • mm β€” the drm_mm allocator to walk πŸšΆβ€β™€οΈ
  • hole_start β€” a ulong variable to assign the hole start to on each iteration ⭐
  • hole_end β€” a ulong variable to assign the hole end to on each iteration 🌈

πŸ¦‹ DESCRIPTION πŸ¦‹

This iterator walks over all holes in the range allocator. It is implemented with list_for_each, so it is not save against removal of elements β€” yes, that’s the wording, bestie, and the vibe check is very much β€œdo not expect removal-proof behavior.” πŸ’€

entry is used internally and will not reflect a real drm_mm_node for the very first hole. Hence users of this iterator may not access it. No cap: do not go poking at entry. πŸ™ˆ

Implementation Note: We need to inline list_for_each_entry in order to be able to set hole_start and hole_end on each iteration while keeping the macro sane.

🌈 SEE ALSO 🌈

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


okay bye bestie β€” this page is drm_mm_for_each_hole(9), coming at you from ./include/drm, October 2026. mwah πŸ’‹πŸ«Ά

πŸ“¦ where this page comes from