MMIO REGIONS EXPOSED TO USERSPACE.(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– MMIO regions exposed to userspace (9) πŸ’–

okay bestie, so this is the ✨ kernel API manual ✨ page about the MMIO regions that get exposed to userspace, and honestly? it's giving "small page, big brain energy." let's get into it 🫢


πŸŽ€ the macros πŸŽ€

  • DRM_PANTHOR_USER_MMIO_OFFSET β€” this is the file offset for all the MMIO regions being exposed to userspace. and listen, the page is literally begging you: don't use this value directly, use the DRM_PANTHOR_USER_<name>_OFFSET values instead, mwah πŸ’…. why tho? because the pgoffset passed to mmap2 is an unsigned long, which forces us to use a different offset on 32-bit vs 64-bit systems. so like, it's a whole thing. no cap.
  • DRM_PANTHOR_USER_FLUSH_ID_MMIO_OFFSET β€” the file offset for the LATEST_FLUSH_ID register 🌸. so here's the lore: the userspace driver controls GPU cache flushing through CS instructions, but the flush reduction mechanism requires a flush_id. in theory this flush_id could be queried with an ioctl, but Arm provides a well-isolated register page containing only this read-only register, so β€” let's expose this page through a static mmap offset and allow direct mapping of this MMIO region so we can avoid the user <-> kernel round-trip 😭✨. iconic behavior honestly.

πŸ¦‹ SEE ALSO πŸ¦‹

bestie the cross-reference list is long and we are not skipping a single one, okay? every single one of these is here, fr fr:

Kernel file ./include/uapi/drm/panthor_drm.h and then, deep breath:

Introduction(9), IOCTL IDs(9), IOCTL arguments(9), struct drm_panthor_obj_array(9), DRM_PANTHOR_OBJ_ARRAY(9), enum drm_panthor_sync_op_flags(9), struct drm_panthor_sync_op(9), enum drm_panthor_dev_query_type(9), enum drm_panthor_gpu_coherency(9), struct drm_panthor_gpu_info(9), struct drm_panthor_csif_info(9), enum drm_panthor_timestamp_info_flags(9), struct drm_panthor_timestamp_info(9), struct drm_panthor_mmu_info(9), struct drm_panthor_group_priorities_info(9), struct drm_panthor_dev_query(9), struct drm_panthor_vm_create(9), struct drm_panthor_vm_destroy(9), enum drm_panthor_vm_bind_op_flags(9), struct drm_panthor_vm_bind_op(9), enum drm_panthor_vm_bind_flags(9), struct drm_panthor_vm_bind(9), enum drm_panthor_vm_state(9), struct drm_panthor_vm_get_state(9), enum drm_panthor_bo_flags(9), struct drm_panthor_bo_create(9), struct drm_panthor_bo_mmap_offset(9), struct drm_panthor_queue_create(9), enum drm_panthor_group_priority(9), struct drm_panthor_group_create(9), struct drm_panthor_group_destroy(9), struct drm_panthor_queue_submit(9), struct drm_panthor_group_submit(9), enum drm_panthor_group_state_flags(9), struct drm_panthor_group_get_state(9), struct drm_panthor_tiler_heap_create(9), struct drm_panthor_tiler_heap_destroy(9), struct drm_panthor_bo_set_label(9), struct drm_panthor_set_user_mmio_offset(9), enum drm_panthor_bo_sync_op_type(9), struct drm_panthor_bo_sync_op(9), struct drm_panthor_bo_sync(9), enum drm_panthor_bo_extra_flags(9), struct drm_panthor_bo_query_info(9), DRM_IOCTL_PANTHOR(9) πŸ’€


and that's the whole page, you ate that πŸ“πŸ’œ

bye bestie!! this one lives in ./include/uapi/drm and it's dated October 2026 β€” see u next time, mwah πŸ˜˜βœ¨πŸŽ€
πŸ“¦ where this page comes from