i915_gem_mmap_offset_ioctl(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay so bestie, welcome to i915_gem_mmap_offset_ioctl(9) from the Kernel API Manual β€” this function’s whole name and vibe is prepare an object for GTT mmap'ing. πŸŽ€ that’s it, that’s the plot, and honestly it’s giving β€œsmall but crucial little helper.” πŸ’…

✨ SYNOPSIS ✨

the signature, exactly as it appears, no edits:

int i915_gem_mmap_offset_ioctl (struct drm_device *dev , void *data ,
       struct drm_file *file );

🫢 ARGUMENTS 🫢

  • dev β€” DRM device. the DRM device, bestie. πŸ’–
  • data β€” GTT mapping ioctl data. yes, the data for the GTT mapping ioctl. ✨
  • file β€” GEM object info. the GEM object info, periodt. πŸŽ€

🌸 DESCRIPTION 🌸

so what does it do? it simply returns the fake offset to userspace so it can mmap it. lowkey iconic, highkey straightforward. πŸ’–

the mmap call will end up in drm_gem_mmap, which will set things up so we can get faults in the handler above. πŸŒ€

the fault handler will take care of:

  • binding the object into the GTT (since it may have been evicted to make room for something),
  • allocating a fence register,
  • and mapping the appropriate aperture address into userspace.

it’s giving β€œbind, allocate, map” main character energy, and we love that for it. πŸ‘‘βœ¨

πŸ¦‹ SEE ALSO πŸ¦‹

  • Kernel file ./drivers/gpu/drm/i915/gem/i915_gem_mman.c β€” that’s the kernel file the page points at, bestie. 🫢
  • i915_gem_mmap_ioctl(9) β€” see also, iykyk. πŸ’œ
  • i915_gem_mmap_gtt_version(9) β€” also see-also, no cap. πŸ¦‹

and that’s the page, bestie! πŸ’– this one’s source/version footer points at ./drivers/gpu/drm/i915/gem, it’s dated October 2026, and it’s living its best life in the Kernel API Manual. go forth and mmap something cute, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from