STRUCT DRM_ASAHI_CMD_COMPUTE(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” the CDM_CTRL_STREAM_BASE register 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, flags is MBZ so keep it zero, and remember cdm_ctrl_stream_end is 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