PVR_IOCTL(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 PVR_IOCTL(9) β€” the Kernel API Manual moment πŸ’…

okay so picture this: you're deep in the kernel, you need a PowerVR IOCTL number, and you're like "not me having to hand-roll this 😭". bestie, breathe. this little macro from the Kernel API Manual is literally the plug 🫢


✨ NAME ✨

PVR_IOCTL β€” build a PowerVR IOCTL number. that's it, that's the whole job, and it eats πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

PVR_IOCTL (_ioctl , _mode , _data );

(yes the spacing is giving what it's giving, we don't touch it, we respect the original ✨)


πŸŽ€ ARGUMENTS πŸŽ€

  • _ioctl β€” an incrementing id for this IOCTL. it gets added to DRM_COMMAND_BASE, lowkey doing the heavy lifting of making your number unique πŸ’«
  • _mode β€” must be one of DRM_IOR, DRM_IOW or DRM_IOWR. no substitutions, no vibes-based alternatives, pick one of the three or it's not gonna slay πŸ™ˆ
  • _data β€” the type of the args struct passed by this IOCTL. just the type, keep reading, there's a name rule below πŸ‘‘

🌈 DESCRIPTION 🌈

so the struct that _data points to has to follow the naming convention, periodt: it needs a drm_pvr_ioctl_ prefix and an _args suffix. and because that's fully predictable, those bits are omitted from _data β€” you're just passing the meaty middle part, iykyk 🌸

🚨 important vibe check: this macro is only for building the constants described below. it should never be used to call an IOCTL directly. like, that's not its main character moment, don't do that to it πŸ’€

⭐ RETURN ⭐

an IOCTL number, ready to be passed to ioctl from userspace. go forth and ioctl, bestie πŸ¦‹


πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, no one left behind 🫢

  • Kernel file ./include/uapi/drm/pvr_drm.h
  • PowerVR UAPI(9)
  • struct drm_pvr_obj_array(9)
  • DRM_PVR_OBJ_ARRAY(9)
  • PowerVR IOCTL interface(9)
  • PowerVR IOCTL DEV_QUERY interface(9)
  • struct drm_pvr_dev_query_gpu_info(9)
  • struct drm_pvr_dev_query_runtime_info(9)
  • struct drm_pvr_dev_query_quirks(9)
  • struct drm_pvr_dev_query_enhancements(9)
  • enum drm_pvr_heap_id(9)
  • struct drm_pvr_heap(9)
  • struct drm_pvr_dev_query_heap_info(9)
  • enum drm_pvr_static_data_area_usage(9)
  • struct drm_pvr_static_data_area(9)
  • struct drm_pvr_dev_query_static_data_areas(9)
  • enum drm_pvr_dev_query(9)
  • struct drm_pvr_ioctl_dev_query_args(9)
  • PowerVR IOCTL CREATE_BO interface(9)
  • Flags for CREATE_BO(9)
  • struct drm_pvr_ioctl_create_bo_args(9)
  • PowerVR IOCTL GET_BO_MMAP_OFFSET interface(9)
  • struct drm_pvr_ioctl_get_bo_mmap_offset_args(9)
  • PowerVR IOCTL CREATE_VM_CONTEXT and DESTROY_VM_CONTEXT interfaces(9)
  • struct drm_pvr_ioctl_create_vm_context_args(9)
  • struct drm_pvr_ioctl_destroy_vm_context_args(9)
  • PowerVR IOCTL VM_MAP and VM_UNMAP interfaces(9)
  • struct drm_pvr_ioctl_vm_map_args(9)
  • struct drm_pvr_ioctl_vm_unmap_args(9)
  • PowerVR IOCTL CREATE_CONTEXT and DESTROY_CONTEXT interfaces(9)
  • enum drm_pvr_ctx_priority(9)
  • enum drm_pvr_ctx_type(9)
  • struct drm_pvr_ioctl_create_context_args(9)
  • struct drm_pvr_ioctl_destroy_context_args(9)
  • PowerVR IOCTL CREATE_FREE_LIST and DESTROY_FREE_LIST interfaces(9)
  • struct drm_pvr_ioctl_create_free_list_args(9)
  • struct drm_pvr_ioctl_destroy_free_list_args(9)
  • PowerVR IOCTL CREATE_HWRT_DATASET and DESTROY_HWRT_DATASET interfaces(9)
  • struct drm_pvr_create_hwrt_geom_data_args(9)
  • struct drm_pvr_create_hwrt_rt_data_args(9)
  • struct drm_pvr_ioctl_create_hwrt_dataset_args(9)
  • struct drm_pvr_ioctl_destroy_hwrt_dataset_args(9)
  • PowerVR IOCTL SUBMIT_JOBS interface(9)
  • Flags for the drm_pvr_sync_op object.(9)
  • struct drm_pvr_sync_op(9)
  • Flags for SUBMIT_JOB ioctl geometry command.(9)
  • Flags for SUBMIT_JOB ioctl fragment command.(9)
  • Flags for SUBMIT_JOB ioctl compute command.(9)
  • Flags for SUBMIT_JOB ioctl transfer command.(9)
  • enum drm_pvr_job_type(9)
  • struct drm_pvr_hwrt_data_ref(9)
  • struct drm_pvr_job(9)
  • struct drm_pvr_ioctl_submit_jobs_args(9)

and that's the page, bestie πŸ’œ this lil icon came to you from ./include/uapi/drm, stamped October 2026, answering to the name PVR_IOCTL(9) β€” go build some IOCTL numbers, you've got this πŸŽ€βœ¨

πŸ“¦ where this page comes from