STRUCT DRM_ASAHI_CMD_COMPUTE(9)
π struct drm_asahi_cmd_compute(9) β the Kernel API Manual, bestie edition β¨
okay so you found the page for struct drm_asahi_cmd_compute and honestly? iconic. this is the kernel API manual (the (9) is right there in the title, iykyk) and we're gonna get you fluent in it. no cap. π«Ά
πΈ NAME πΈ
struct drm_asahi_cmd_compute β literally the command you submit when you want compute. that's the whole vibe. π
β¨ SYNOPSIS β¨
the shape of it, verbatim, don't @ me:
struct drm_asahi_cmd_compute {
__u32 flags;
__u32 sampler_count;
__u64 cdm_ctrl_stream_base;
__u64 cdm_ctrl_stream_end;
__u64 sampler_heap;
struct drm_asahi_helper_program helper;
struct drm_asahi_timestamps ts;
};
π Members π
flagsβ MBZ. that's "must be zero," bestie, so pls leave it at zero. π«₯sampler_countβ how many samplers are chilling in the sampler heap. count 'em.cdm_ctrl_stream_baseβ theCDM_CTRL_STREAM_BASEregister value. it's the GPU address pointing at the beginning of the CDM control stream. the origin story, basically. π±cdm_ctrl_stream_endβ the GPU base address pointing at the end of the hardware control stream. β οΈ heads up: this only considers the first contiguous segment of the control stream, because the stream might jump elsewhere. so like, don't assume it's the end-end. it's giving "first chapter finale."sampler_heapβ base address of the sampler heap. where the samplers live. πhelperβ the helper program used for this compute command (type:struct drm_asahi_helper_program). your little sidekick. π§tsβ the timestamps for the compute command (type:struct drm_asahi_timestamps). timekeeping, but make it GPU. β±οΈ
π₯ Description π₯
so this command submits a control stream made up of compute dispatches. and here's the slay: there is essentially no limit on how many compute dispatches you can pack into a single compute command. go off, honestly. π
but β and this is the catch β timestamps are at command granularity. so the vibe check is: dispatches? as many as you want. timestamps? per-command, not per-dispatch. periodt. π
π SEE ALSO π
the whole friend group, in order, don't skip anyone:
- the kernel file
./include/uapi/drm/asahi_drm.h - Introduction to the Asahi UAPI(9)
enum drm_asahi_ioctl_id(9)struct drm_asahi_params_global(9)enum drm_asahi_feature(9)struct drm_asahi_get_params(9)struct drm_asahi_vm_create(9)struct drm_asahi_vm_destroy(9)enum drm_asahi_gem_flags(9)struct drm_asahi_gem_create(9)struct drm_asahi_gem_mmap_offset(9)enum drm_asahi_bind_flags(9)struct drm_asahi_gem_bind_op(9)struct drm_asahi_vm_bind(9)enum drm_asahi_bind_object_op(9)enum drm_asahi_bind_object_flags(9)struct drm_asahi_gem_bind_object(9)enum drm_asahi_cmd_type(9)enum drm_asahi_priority(9)struct drm_asahi_queue_create(9)struct drm_asahi_queue_destroy(9)enum drm_asahi_sync_type(9)struct drm_asahi_sync(9)DRM_ASAHI_BARRIER_NONE(9)struct drm_asahi_cmd_header(9)struct drm_asahi_submit(9)struct drm_asahi_attachment(9)struct drm_asahi_zls_buffer(9)struct drm_asahi_timestamp(9)struct drm_asahi_timestamps(9)struct drm_asahi_helper_program(9)struct drm_asahi_bg_eot(9)struct drm_asahi_cmd_render(9)struct drm_asahi_get_time(9)DRM_IOCTL_ASAHI(9)
ngl bestie,flagsis MBZ so keep it zero, and remembercdm_ctrl_stream_endis only the end of the first contiguous segment. the stream can jump. π¦
and that's the page! π this little gem lives in ./include/uapi/drm, and the version/date stamp at the bottom is October 2026 β so like, future-core of it all. mwah, go build something iconic. πβ¨
π¦ 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