i915_vma_pin_iomap(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… i915_vma_pin_iomap πŸ’…

okay so bestie, welcome to the Kernel API Manual page for i915_vma_pin_iomap(9) β€” yes that's the full title, yes it's a mouthful, no I will not be shortening it, iykyk πŸŽ€


✨ NAME ✨

i915_vma_pin_iomap β€” this one literally just calls ioremap_wc to map the GGTT VMA through the aperture. that's the whole vibe. that's the job. πŸ¦‹


🌸 SYNOPSIS 🌸

void __iomem * i915_vma_pin_iomap (struct i915_vma *vma );

like, look at her. returning a void __iomem *. main character energy fr fr ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • vma β€” the VMA we're gonna iomap. that's it, that's the argument. she's the VMA to iomap πŸ’–

πŸ”₯ DESCRIPTION πŸ”₯

okay so, important stuff first, no cap: the VMA you pass in has to be pinned in the global GTT mappable region. like, that's a prerequisite, not a suggestion. vibe check your VMA before you call this. ⭐

then β€” and this is the part people forget β€” an extra pinning of the VMA gets acquired for the returned iomapping. so you're now holding an extra pin. so the caller (that's you, bestie 🫢) must call i915_vma_unpin_iomap to relinquish that pinning once the iomapping is no longer required. don't just walk away from it, that's so not slay. πŸ’€

leftover pins are giving "i forgot to return the shopping cart" energy and the kernel will absolutely notice 😭

and what do you get back? either a valid iomapped pointer, or an ERR_PTR. so check it. always check it. IS_ERR is your bestie here πŸ’…


πŸ‘‘ SEE ALSO πŸ‘‘

all my girls in the kernel file ./drivers/gpu/drm/i915/i915_vma.h:

go read them. they're iconic. 🌈


✨ that's the whole page bestie, go forth and unpin responsibly ✨

this masterpiece lives in ./drivers/gpu/drm/i915, dated October 2026, and it's page i915_vma_pin_iomap(9) of the Kernel API Manual β€” mwah, xx πŸ’‹πŸŒΈπŸ§š

πŸ“¦ where this page comes from