STRUCT DRM_PANFROST_CREATE_BO(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct drm_panfrost_create_bo(9) πŸ’–

okay bestie, so this is a page straight out of the Kernel API Manual, and it's literally all about struct drm_panfrost_create_bo β€” the ioctl argument for creating Panfrost BOs. yes, that Panfrost. yes, those BOs. let's get into it 🫢


✨ NAME ✨

struct drm_panfrost_create_bo β€” the ioctl argument for creating Panfrost BOs. that's it, that's the whole vibe πŸ’…


🌸 SYNOPSIS 🌸

struct drm_panfrost_create_bo {
    __u32 size;
    __u32 flags;
    __u32 handle;
    __u32 pad;
    __u64 offset;
 };

look at that struct. immaculate. no notes. πŸŽ€


πŸ¦‹ Members πŸ¦‹

okay so let's meet the cast, one field at a time:

  • size β€” the size of the shmem/BO area to create, in bytes. this is the "how much room do we need" of it all πŸ’«
  • flags β€” a bit mask! see the PANFROST_BO_* flags for the deets 🚩
  • handle β€” the returned GEM handle for the BO. you give it the struct, it gives you the handle 🎁
  • pad β€” padding, and it must be zero-filled. zero. filled. no cap. don't be weird about this πŸ™ˆ
  • offset β€” the returned offset for the BO in the GPU address space. this offset is private to the DRM fd and is valid for the lifetime of the GEM handle πŸ‘‘

and listen, one little thing about offset that you need to know: this value will always be nonzero, because various HW units treat 0 specially. so if you ever see a zero offset and think "slay, free real estate," nope β€” that's not a thing πŸ’€


πŸ”₯ Description πŸ”₯

the flags argument is a bit mask of PANFROST_BO_* flags. that's literally the whole description and honestly? iconic. short. sweet. ate. 🌈


🧚 SEE ALSO 🧚

go read these next, bestie, it's giving required reading:

  • Kernel file ./include/uapi/drm/panfrost_drm.h β€” literally the source of truth βœ…
  • struct drm_panfrost_submit(9)
  • struct drm_panfrost_wait_bo(9)
  • struct drm_panfrost_mmap_bo(9)
  • struct drm_panfrost_set_label_bo(9)
  • struct drm_panfrost_sync_bo(9)

and that's the whole page, no crumbs left πŸ’œ this lil' beauty lives over in ./include/uapi/drm and it was dated way out in October 2026 β€” yes, the future, main character energy fr fr. mwah, go create some BOs responsibly πŸ“βœ¨πŸ’…

πŸ“¦ where this page comes from