pvr_ioctl_ge..._mmap_offset(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… pvr_ioctl_get_bo_mmap_offset β€” the Kernel API Manual tea 🫢

okay so bestie, welcome to the pvr_ioctl_ge..._mmap_offset(9) page (yes the title is long, she's dramatic, we love her). This is the Kernel API Manual and it's all about one very specific little ioctl. Strap in. ✨


✨ NAME ✨

pvr_ioctl_get_bo_mmap_offset β€” it's the IOCTL that generates a "fake" offset, and you use that offset when you call mmap() from userspace to map the given GEM buffer object. That's literally her whole job. Iconic behavior, no notes. πŸ’…


🌸 SYNOPSIS 🌸

int pvr_ioctl_get_bo_mmap_offset (struct drm_device *drm_dev , void
*raw_args , struct drm_file *file );

three params, one function, let's get into it πŸ‘‡


πŸŽ€ ARGUMENTS πŸŽ€

  • drm_dev [IN] β€” the DRM device. and honestly? she's unused. main character who doesn't show up to her own party 😭 still gotta pass her tho.
  • raw_args [IN/OUT] β€” the arguments passed to this IOCTL. this one must be of type struct drm_pvr_ioctl_get_bo_mmap_offset_args. no substitutions, bestie, it's giving very specific.
  • file [IN] β€” the DRM file private data. the private data, the lore, the backstory. πŸ¦‹

πŸ’– DESCRIPTION πŸ’–

so the way this works: userspace calls in with DRM_IOCTL_PVR_GET_BO_MMAP_OFFSET, and this function answers the door.

but listen β€” and this is the important part β€” this IOCTL does *not* perform an mmap. not even a little. it just makes the fake offset, it does not do the mapping. if you want the full details, the docs on struct drm_pvr_ioctl_get_bo_mmap_offset_args have you covered. iykyk 🧚

lowkey the name is a trap, "mmap_offset" β‰  "does the mmap". she's a provider of offsets, not a mapper. periodt.

πŸ”₯ RETURN πŸ”₯

  • 0 β€” on success πŸŽ‰ slay.
  • -ENOENT β€” if the handle does not reference a valid GEM buffer object. the handle is giving nothing, it's not valid, we're upset. πŸ’€
  • -EINVAL β€” if any padding fields in struct drm_pvr_ioctl_get_bo_mmap_offset_args are not zero. zero them. all of them. πŸ™ˆ
  • any error returned by drm_gem_create_mmap_offset β€” yeah, whatever that returns, that's what you get. no cap.

🌈 SEE ALSO 🌈

the whole friend group, assembled 🫢:


okay that's the whole page, you ate that πŸ’œ this lil gem dropped from ./drivers/gpu/drm/imagination, dated October 2026, and her full name is pvr_ioctl_ge..._mmap_offset(9) β€” go forth and map your buffers responsibly, bestie β­πŸŒΈπŸ‘‘

πŸ“¦ where this page comes from