drm_gpusvm_get_pages(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… drm_gpusvm_get_pages(9)

okay so bestie, welcome to the Kernel API Manual β€” this one's drm_gpusvm_get_pages, and it's genuinely the moment where your CPU pages get their whole GPU-era glow-up ✨


πŸŽ€ NAME πŸŽ€

drm_gpusvm_get_pages β€” grab pages and populate the GPU SVM pages struct, no cap.


πŸ¦‹ SYNOPSIS πŸ¦‹

int drm_gpusvm_get_pages (struct drm_gpusvm *gpusvm , struct
       drm_gpusvm_pages *svm_pages , struct mm_struct *mm , struct
       mmu_interval_notifier *notifier , unsigned long pages_start , unsigned
       long pages_end , const struct drm_gpusvm_ctx *ctx );

like, look at that signature. seven whole parameters. main character energy fr fr πŸ’…


🌸 ARGUMENTS 🌸

  • gpusvm β€” Pointer to the GPU SVM structure. your home base 🏠
  • svm_pages β€” The SVM pages to populate. This will contain the dma-addresses β€” so yeah, it comes back with the goods πŸ’–
  • mm β€” The mm corresponding to the CPU range. the vibe check for which address space we're in.
  • notifier β€” The corresponding notifier for the given CPU range. it's giving "I'll let you know if anything moves" πŸ“£
  • pages_start β€” Start CPU address for the pages.
  • pages_end β€” End CPU address for the pages (exclusive). exclusive!! important!! don't @ me πŸ™ˆ
  • ctx β€” GPU SVM context.

✨ DESCRIPTION ✨

This function gets and maps pages for the CPU range and ensures they are mapped for DMA access.

that's it. that's the whole thing. it lowkey ate and left no crumbs β€” CPU range in, DMA-mapped pages out, and everything in between is handled for you 🫢


πŸ”₯ RETURN πŸ”₯

0 on success, negative error code on failure. classic. iconic. periodt. πŸ‘‘


🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/drm_gpusvm.c

like, that's a whole friend group and you're gonna want to know all of them πŸ’œ


and that's the page!! 🌟 this lil manpage lives in ./drivers/gpu/drm, and it's stamped October 2026 β€” mwah, go read the actual source, ily, bye πŸ§šπŸ’–

πŸ“¦ where this page comes from