for_each_ggtt_vma(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– for_each_ggtt_vma(9) β€” Kernel API Manual πŸ’–

okay so bestie, welcome to the for_each_ggtt_vma(9) page, straight out of the Kernel API Manual ✨ this one is short and sweet and honestly kind of iconic for it.


✨ NAME ✨

for_each_ggtt_vma β€” iterate over the GGTT VMA belonging to an object. that's it. that's the whole job 🫢


🌸 SYNOPSIS 🌸

for_each_ggtt_vma (V , OBJ );

πŸŽ€ ARGUMENTS πŸŽ€

  • V β€” the #i915_vma iterator πŸ’« this is your little cursor, your main character walking the list
  • OBJ β€” the #drm_i915_gem_object πŸ‘‘ the object whose VMAs we're out here iterating, no cap

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, and it's actually such a clean design choice:

GGTT VMAs are placed at the beginning of the object's vma_list β€” see vma_create β€” so we can stop our walk as soon as we see a ppgtt VMA. or, y'know, when the list is empty, ofc πŸ’…

that's literally it. the ordering is doing all the work for us and honestly? we stan an early exit πŸ”₯


🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/i915/i915_vma.h, plus the whole friend group:


and that's the page, bestie!! 🧚 source/version is ./drivers/gpu/drm/i915 and the date on this cutie is October 2026 β€” go forth and iterate responsibly πŸ’œπŸŒΈπŸŽ€

πŸ“¦ where this page comes from