i915_gem_mmap_offset_ioctl(9)
π 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
- 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