i915_gem_mmap_ioctl(9)
πΈ NAME πΈ
okay so welcome to the i915_gem_mmap_ioctl(9) page from the Kernel API Manual β manual name folded in right here at the top, bestie, because we are absolutely not copying that header line. This one is i915_gem_mmap_ioctl, and it maps the contents of an object, returning the address it is mapped to. π
π¦ SYNOPSIS π¦
like, here is the signature exactly:
int i915_gem_mmap_ioctl (struct drm_device *dev , void *data , struct
drm_file *file );
π ARGUMENTS π
devβ the drm device β¨dataβ the ioctl data blob π«Άfileβ the drm file π
π DESCRIPTION π
So the mapping does hold a reference on the contents of the object, but it does not imply a ref on the object itself. tiny but important distinction, okay? π
β οΈ IMPORTANT: DRM driver writers who look at this function as an example for how to do GEM mmap support β please, please don't implement mmap support like here. The modern way to implement DRM mmap support is with an mmap offset ioctl (likei915_gem_mmap_gtt) and then using themmapsyscall on the DRM fd directly. That way debug tooling like valgrind will understand what's going on; hiding the mmap call in a driver private ioctl will break that. The i915 driver only does cpu mmaps this way because we didn't know better. π
β¨ SEE ALSO β¨
- Kernel file
./drivers/gpu/drm/i915/gem/i915_gem_mman.cβ go peek π i915_gem_mmap_gtt_version(9)i915_gem_mmap_offset_ioctl(9)
xoxo, from the source/version ./drivers/gpu/drm/i915/gem, dated October 2026 β i915_gem_mmap_ioctl(9) out π
π¦ 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