STRUCT DRM_VC4_SUBMIT_CL(9)
π NAME π
struct drm_vc4_submit_cl β bestie, this is the ioctl argument for submitting commands to the 3D engine. That's the whole glow-up. β¨
And yes, this page lives in the Kernel API Manual β very demure, very kernel. π
β¨ SYNOPSIS β¨
Okay so here's the struct in all its glory, presented unfiltered, no edits, exactly as it is β keep every field, no cap:
struct drm_vc4_submit_cl {
__u64 bin_cl;
__u64 shader_rec;
__u64 uniforms;
__u64 bo_handles;
__u32 bin_cl_size;
__u32 shader_rec_size;
__u32 shader_rec_count;
__u32 uniforms_size;
__u32 bo_handle_count;
__u16 width;
__u16 height;
__u8 min_x_tile;
__u8 min_y_tile;
__u8 max_x_tile;
__u8 max_y_tile;
struct drm_vc4_submit_rcl_surface color_read;
struct drm_vc4_submit_rcl_surface color_write;
struct drm_vc4_submit_rcl_surface zs_read;
struct drm_vc4_submit_rcl_surface zs_write;
struct drm_vc4_submit_rcl_surface msaa_color_write;
struct drm_vc4_submit_rcl_surface msaa_zs_write;
__u32 clear_color[2];
__u32 clear_z;
__u8 clear_s;
__u32 pad:24;
#define VC4_SUBMIT_CL_USE_CLEAR_COLOR (1 << 0);
#define VC4_SUBMIT_CL_FIXED_RCL_ORDER (1 << 1);
#define VC4_SUBMIT_CL_RCL_ORDER_INCREASING_X (1 << 2);
#define VC4_SUBMIT_CL_RCL_ORDER_INCREASING_Y (1 << 3);
__u32 flags;
__u64 seqno;
__u32 perfmonid;
__u32 in_sync;
__u32 out_sync;
__u32 pad2;
};
Look at all those fields. bin_cl, shader_rec, uniforms, bo_handles, all the sizes and counts, the tile bounds (min_x_tile, min_y_tile, max_x_tile, max_y_tile), the whole lineup of drm_vc4_submit_rcl_surface members, the clear values, the four VC4_SUBMIT_CL_* flag macros, and the sync fields at the end. Iconic. π«Ά
πΈ MEMBERS πΈ
This heading is here, and then it justβ¦ rolls straight into the description below. The page does not spell out per-member blurbs here, so neither am I β we're matching the energy, not inventing lore. π
π¦ DESCRIPTION π¦
okay so. Here's the situation, and it's giving big brain:
Drivers typically use GPU BOs to store batchbuffers / command lists and their associated state. Normal. Expected. Fine.
But β plot twist π β because the VC4 lacks an MMU, we have to do validation of memory accesses by the GPU commands. It's not optional, it's the whole assignment.
And if we were to store our commands in BOs, we'd need to do uncached readback from them to do the validation process β which is too expensive. Not "meh" expensive. Too expensive. π
So instead, the workflow is:
- userspace accumulates commands and associated state in plain memory π±
- then the kernel copies the data to its own address space π¦
- and then validates it and stores it in a GPU BO π
Three steps, no wasted readback, no drama. Periodt. π
ngl this design exists because there's no MMU on the VC4 β that's the reason, that's the vibe, that's the constraint. Don't forget it. π§
π SEE ALSO π
Kernel file ./include/uapi/drm/vc4_drm.h, plus these absolute main characters of the API:
struct drm_vc4_wait_seqno(9)struct drm_vc4_wait_bo(9)struct drm_vc4_create_bo(9)struct drm_vc4_mmap_bo(9)struct drm_vc4_create_shader_bo(9)struct drm_vc4_label_bo(9)
Go read them, they're all linked in the group chat. π¬
mwah π that's the page, bestie β brought to you from ./include/uapi/drm, dated October 2026, and stamped struct drm_vc4_submit_cl(9) at the top and bottom like a little bow on a gift. πβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms