STRUCT DRM_PANTHOR_BO_CREATE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_panthor_bo_create(9) β€” from the Kernel API Manual, bestie πŸŽ€

okay so picture this: you're in the Kernel API Manual, right, and this is the page for struct drm_panthor_bo_create β€” literally the arguments you hand over to DRM_IOCTL_PANTHOR_BO_CREATE. that's it. that's the whole vibe. no cap. ✨


🌸 NAME 🌸

struct drm_panthor_bo_create β€” Arguments passed to DRM_IOCTL_PANTHOR_BO_CREATE.

like… that's the entire personality. it passes args. it serves. periodt. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_panthor_bo_create {
    __u64 size;
    __u32 flags;
    __u32 exclusive_vm_id;
    __u32 handle;
    __u32 pad;
 };

look at her. five fields. every one of them iconic. copy it exactly, don't get creative, the kernel is NOT the place for creative writing 🫢


✨ Members ✨

πŸ’– size

The requested size for the object, bestie. that's the ask.

and here's the lil plot twist: the (page-aligned) allocated size for the object is what gets returned back to you. so what you asked for and what you got? not always the same number. the kernel is doing its little rounding thing. slay, honestly. 😭

🌈 flags

Flags, duh. must be a combination of drm_panthor_bo_flags flags. like, a combination β€” that's the rule, i don't make them, i just report them πŸ’€

πŸ¦„ exclusive_vm_id

The exclusive VM this buffer object will be mapped to. very main character energy, very "this BO belongs to ONE VM and everyone else can cope."

if it's not zero, then lowkey there are rules, and the field must refer to a valid VM ID, and it implies, like, two whole things:

  • the buffer object will only ever be bound to that VM
  • it cannot be exported as a PRIME fd

not me reading "cannot be exported as a PRIME fd" like three times to make sure i got it right 😭 it's a real restriction, it's not a suggestion. write it down. πŸ“

πŸŽ€ handle

The returned handle for the object. yes, returned β€” you don't set this, you receive it. and heads up: object handles are nonzero. so if you see a zero, something went sideways, fr fr.

🌸 pad

MBZ.

like β€” must be zero. that's the whole field. it's padding. it's there for alignment reasons and it wants to be 0 and nothing else. respect its boundaries πŸ™ˆ


⚠️ tiny disclaimer bestie: pad = MBZ = must be zero. i'm not being dramatic, that's literally what the manpage says and i refuse to soften it πŸ’€

πŸ‘‘ SEE ALSO πŸ‘‘

okay this is the part where the page just. lists everyone. the whole group chat. literally the entire panthor_drm.h extended universe:

Kernel file ./include/uapi/drm/panthor_drm.h Introduction(9), MMIO regions exposed to userspace.(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_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)

like… that's a LOT of friends. go read them. iykyk πŸ’œ


✨ and that's the page!! ✨ sourced straight from ./include/uapi/drm, dated October 2026, and honestly? she ate. mwah. πŸ’‹πŸ¦‹πŸŒΈπŸ’–πŸŽ€πŸ«Ά

πŸ“¦ where this page comes from