STRUCT DRM_ASAHI_HELPER_PROGRAM(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– struct drm_asahi_helper_program πŸ’–

okay bestie so this is a page from the Kernel API Manual β€” yes it's giving "I read the docs so you don't have to" energy, and honestly? slay. We're talking about struct drm_asahi_helper_program, which is literally the little configuration bundle that describes a helper program. Iconic. Let's go 🫢


✨ NAME ✨

struct drm_asahi_helper_program β€” describes the helper program configuration. That's it, that's the whole vibe check πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

okay here's the whole thing, no cap, copy it exactly:

struct drm_asahi_helper_program {
    __u32 binary;
    __u32 cfg;
    __u64 data;
 };

three little fields, tiny struct, big main character energy ✨


πŸŽ€ Members πŸŽ€

  • binary β€” so this is the USC address to the helper program binary. and it's a tagged pointer, meaning the configuration lives in the bottom bits. sneaky? a little. valid? absolutely πŸ’œ
  • cfg β€” extra configuration bits for the helper program. like, the little extras. the accessories of the struct πŸŽ€
  • data β€” data passed to the helper program. and listen, this value is NOT interpreted by the kernel, firmware, or hardware in any way. none of them. not even a little. it's simply a sideband for userspace β€” set with the submit ioctl, and read via special registers inside the helper program. that's the whole relationship πŸ”₯
and in practice? userspace will pass a 64-bit GPU VA here pointing to the actual arguments β€” which presumably don't fit in 64-bits. so yeah, one layer of indirection, as a treat πŸ™ˆ

🧚 Description 🧚

so the helper program is a compute-like kernel that's required for various hardware functionality. bestie it does several things but its most important role? dynamically allocating scratch/stack memory for individual subgroups, by partitioning a static allocation shared for the whole device. very "sharing is caring" of it. πŸ’–

it's supplied by userspace via drm_asahi_helper_program, and internally dispatched by the hardware as needed. the hardware just handles it. no notes. πŸ‘‘

aaand this struct is embedded in other structs β€” which means, important, it is not extensible. like, you can't grow it later. that door is closed. it's giving permanent. πŸ’€


🌈 SEE ALSO 🌈

the whole friend group, all of them, every single one:

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_bg_eot(9), struct drm_asahi_cmd_render(9), struct drm_asahi_cmd_compute(9), struct drm_asahi_get_time(9), DRM_IOCTL_ASAHI(9)


🌸 and that's the page!! shoutout to ./include/uapi/drm and the October 2026 timestamp β€” we stan a documented struct. go read the other ones too, iykyk πŸ¦‹πŸ’œβœ¨
πŸ“¦ where this page comes from