for_each_ggtt_vma(9)
π 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_vmaiterator π« this is your little cursor, your main character walking the listOBJβ 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:
i915_vma_size(9)i915_vma_offset(9)i915_vma_pin_iomap(9)i915_vma_unpin_iomap(9)i915_vma_pin_fence(9)i915_vma_unpin_fence(9)i915_vma_get_current_resource(9)
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
- 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