STRUCT DRM_PANTHOR_QUEUE_SUBMIT(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct drm_panthor_queue_submit(9) β€” the Kernel API Manual, but make it make sense πŸŽ€

okay so bestie, real talk: this is struct drm_panthor_queue_submit from the kernel API manual, and it's literally the "here's my job, please run it" args. it's giving job-submission-arguments energy and honestly? iconic. ✨


🌸 SYNOPSIS 🌸

here's the whole struct, exactly as it is, no cap:

struct drm_panthor_queue_submit {
    __u32 queue_index;
    __u32 stream_size;
    __u64 stream_addr;
    __u32 latest_flush;
    __u32 pad;
    struct drm_panthor_obj_array syncs;
 };

πŸ¦‹ Members πŸ¦‹

  • queue_index β€” which queue this is, like, inside a group. index of the queue inside a group. that's the vibe. 🎯
  • stream_size β€” the size of the command stream you wanna execute. size of the command stream to execute.

it must be 64-bit/8-byte aligned (that's the size of a CS instruction, iykyk).

it can be zero if stream_addr is zero too. fr.

and when the stream size is zero? the queue submit just serves as a synchronization point. that's it, that's the whole job. 🫢

  • stream_addr β€” GPU address of the command stream to execute. the command stream you're executing, at its GPU address.

it must be aligned on 64-byte. πŸ’…

it can be zero if stream_size is zero too. (yes, the manual says "is" β€” we're keeping it, it's cute.)

  • latest_flush β€” the FLUSH_ID you read at the time the stream was built. πŸ“–

this lets the kernel do cache flush elimination for the automatic flush+invalidate(all) that happens at submission time β€” and that flush is needed so the GPU doesn't read garbage when it's reading the indirect command stream buffers. πŸ—‘οΈ so if you want the cache flush to happen unconditionally, just pass a zero here. periodt.

it's ignored when stream_size is zero. πŸ™ˆ

  • pad β€” MBZ. (must be zero, bestie, don't get creative.)
  • syncs β€” array of struct drm_panthor_sync_op sync operations. πŸ”₯

✨ Description ✨

so this struct is describing the userspace command stream that the kernel command stream ring-buffer is gonna call. that's the whole thing. πŸŽ€

and listen: queue submission is always part of a group submission β€” it takes one or more jobs to submit to the underlying queues. no solo runs here, it's a group activity. πŸ‘‘


πŸ’œ SEE ALSO πŸ’œ

kernel file ./include/uapi/drm/panthor_drm.h, plus the whole friend group: 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_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_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. read them all. πŸ“šπŸ’–


ok but real one: pad is MBZ, stream_size/stream_addr have strict alignment rules (8-byte and 64-byte respectively), and zeroing latest_flush forces the flush to happen unconditionally. don't skip those, they will bite you. 😭

that's the whole page bestie, hope it slayed πŸŒˆπŸ’… β€” this one's from ./include/uapi/drm, dated October 2026, and the page is struct drm_...queue_submit(9). go forth and submit those queues, queen. πŸ‘‘β­πŸ“

πŸ“¦ where this page comes from