i915_vma_pin_iomap(9)
π 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:
i915_vma_size(9)i915_vma_offset(9)i915_vma_unpin_iomap(9)i915_vma_pin_fence(9)i915_vma_unpin_fence(9)for_each_ggtt_vma(9)i915_vma_get_current_resource(9)
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
- 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