pvr_ioctl_vm_map(9)
π pvr_ioctl_vm_map(9) β like, the Kernel API Manual page, bestie
Hey so this is pvr_ioctl_vm_map, straight out of the Kernel API Manual, and it's lowkey the IOCTL that maps a buffer into GPU address space. Main character energy for real. Let's get into it π«Ά
β¨ NAME β¨
pvr_ioctl_vm_map β the IOCTL that maps a buffer into the GPU address space. That's it, that's the vibe. π¦
πΈ SYNOPSIS πΈ
int pvr_ioctl_vm_map (struct drm_device *drm_dev , void *raw_args ,
struct drm_file *file );
Look at her. Gorgeous signature. Copy it exactly, no cap. π
π ARGUMENTS π
drm_dev[IN] β the DRM device. The whole device. The moment. πraw_args[IN] β the arguments that got passed into this IOCTL. Heads up: this must be of typestruct drm_pvr_ioctl_vm_map_args. Not optional, not negotiable, literally must. πfile[IN] β the DRM file's private data. Private! Data! π
β DESCRIPTION β
Okay so the way this works: userspace calls it with DRM_IOCTL_PVR_VM_MAP. That's the whole description and honestly? Iconic brevity. π
π₯ RETURN π₯
Here's the vibe check on what you get back:
0on success β slay β¨-EINVALifdrm_pvr_ioctl_vm_op_map_args.flagsis not zero. Zero means zero, bestie, don't get cute with it. π-EINVALif the bounds specified bydrm_pvr_ioctl_vm_op_map_args.offsetanddrm_pvr_ioctl_vm_op_map_args.sizeare not valid, or if they don't fall within the buffer object specified bydrm_pvr_ioctl_vm_op_map_args.handle.Ngl this one catches a lot of people π-EINVALif the bounds specified bydrm_pvr_ioctl_vm_op_map_args.device_addranddrm_pvr_ioctl_vm_op_map_args.sizedon't form a valid device-virtual address range that falls entirely within a single heap. Entirely. Within a single heap. Read it twice, I'll wait πΈ-ENOENTifdrm_pvr_ioctl_vm_op_map_args.handledoes not refer to a valid PowerVR buffer object. i.e. the handle is giving nothing. Not found. Ghosted. π»
Like, respectfully β every single one of those -EINVALs is a different way to fumble the same call. Check your flags, check your bounds, check your handle. In that order. You're welcome π«Ά
π SEE ALSO π
Go read these next, they're all in the friend group:
- Kernel file
./drivers/gpu/drm/imagination/pvr_drv.c - PowerVR (Series 6 and later) and IMG Graphics Driver(9)
pvr_ioctl_create_bo(9)pvr_ioctl_get_bo_mmap_offset(9)pvr_dev_query_gpu_info_get(9)pvr_dev_query_runtime_info_get(9)pvr_dev_query_quirks_get(9)pvr_dev_query_enhancements_get(9)pvr_ioctl_dev_query(9)pvr_ioctl_create_context(9)pvr_ioctl_destroy_context(9)pvr_ioctl_create_free_list(9)pvr_ioctl_destroy_free_list(9)pvr_ioctl_create_hwrt_dataset(9)pvr_ioctl_destroy_hwrt_dataset(9)pvr_ioctl_create_vm_context(9)pvr_ioctl_destroy_vm_context(9)pvr_ioctl_vm_unmap(9)pvr_drm_driver_open(9)pvr_drm_driver_postclose(9)
And that's the page!! π This lil masterpiece lives in ./drivers/gpu/drm/imagination and it's dated October 2026, so mark your calendars bestie. kthxbye, go map some buffers responsibly π§ββοΈβ¨
π¦ 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