STRUCT DRM_XE_EXEC(9)
β¨ struct drm_xe_exec(9) β¨
okay bestie, welcome to the Kernel API Manual π
β yes we're in the kernel API manual, and yes it's serving. today's main character is struct drm_xe_exec, and honestly? she's iconic. let's get into it π
π NAME π
struct drm_xe_exec β the input of &DRM_IOCTL_XE_EXEC. that's it, that's the whole vibe check. she's the little envelope you hand the kernel to say "hey, run this thing" π¦
β¨ SYNOPSIS β¨
struct drm_xe_exec {
__u64 extensions;
__u32 exec_queue_id;
#define DRM_XE_MAX_SYNCS 1024;
__u32 num_syncs;
__u64 syncs;
__u64 address;
__u16 num_batch_buffer;
__u16 pad[3];
__u64 reserved[2];
};
like, look at her. immaculate. no notes. π
πΈ Members πΈ
extensionsβ pointer to the first extension struct, if there is one. if any. no pressure. π«Άexec_queue_idβ the exec queue ID for the batch buffer. this is which queue is doing the running, iykyk.num_syncsβ how manystruct drm_xe_syncare chilling in the array. amount of them. the headcount.syncsβ pointer to thestruct drm_xe_syncarray. this is where the sync structs actually live.addressβ the address of the batch buffer ifnum_batch_buffer == 1, or an array of batch buffer addresses. yes, it changes shape depending on that count. she contains multitudes πnum_batch_bufferβ number of batch buffers in this exec, and it must match the width of the engine. do not play with this. she will know.padβ MBZ. (that's "must be zero", bestie β not "maybe zero", not "zero-ish", MBZ. keep it zero π¨)reservedβ reserved. don't touch, don't poke, don't ask. π
π¦ Description π¦
so here's the moment you've all been waiting for β this is an example of using struct drm_xe_exec to execute the object sitting at BIND_ADDRESS (and yes, the example for that lives in struct drm_xe_vm_bind), by an exec_queue (example for that? it's over in struct drm_xe_exec_queue_create). and if you want it synchronized, there's an example waiting for you in struct drm_xe_sync. we love a crossover episode π
struct drm_xe_exec exec = {
.exec_queue_id = exec_queue,
.syncs = sync,
.num_syncs = 1,
.address = BIND_ADDRESS,
.num_batch_buffer = 1,
};
ioctl(fd, DRM_IOCTL_XE_EXEC, exec);
literally that's it. fill the struct, call the ioctl, slay. β¨π₯
π§ SEE ALSO π§
the kernel file, aka where all the lore is written down: ./include/uapi/drm/xe_drm.h π
and now the whole group chat, because nobody gets left on read:
Xe Device Block Diagram(9)Xe uAPI Overview(9)Xe IOCTL Extensions(9)struct drm_xe_user_extension(9)struct drm_xe_ext_set_property(9)struct drm_xe_engine_class_instance(9)struct drm_xe_engine(9)struct drm_xe_query_engines(9)enum drm_xe_memory_class(9)struct drm_xe_mem_region(9)struct drm_xe_query_mem_regions(9)struct drm_xe_query_config(9)struct drm_xe_gt(9)struct drm_xe_query_gt_list(9)struct drm_xe_query_topology_mask(9)struct drm_xe_query_engine_cycles(9)struct drm_xe_query_uc_fw_version(9)struct drm_xe_query_pxp_status(9)struct drm_xe_device_query(9)struct drm_xe_gem_create(9)struct drm_xe_gem_mmap_offset(9)struct drm_xe_vm_create(9)struct drm_xe_vm_destroy(9)struct drm_xe_vm_bind_op(9)struct drm_xe_vm_bind(9)struct drm_xe_vm_get_property(9)struct drm_xe_exec_queue_create(9)struct drm_xe_exec_queue_destroy(9)struct drm_xe_exec_queue_get_property(9)struct drm_xe_sync(9)struct drm_xe_wait_user_fence(9)enum drm_xe_observation_type(9)enum drm_xe_observation_op(9)struct drm_xe_observation_param(9)enum drm_xe_observation_ioctls(9)enum drm_xe_oa_unit_type(9)struct drm_xe_oa_unit(9)struct drm_xe_query_oa_units(9)enum drm_xe_oa_format_type(9)enum drm_xe_oa_property_id(9)struct drm_xe_oa_config(9)struct drm_xe_oa_stream_status(9)struct drm_xe_oa_stream_info(9)enum drm_xe_pxp_session_type(9)enum drm_xe_eu_stall_property_id(9)struct drm_xe_query_eu_stall(9)struct drm_xe_madvise(9)struct drm_xe_mem_range_attr(9)struct drm_xe_vm_query_mem_range_attr(9)struct drm_xe_exec_queue_set_property(9)Xe DRM RAS(9)enum drm_xe_ras_error_severity(9)enum drm_xe_ras_error_component(9)
and that's the page, bestie π«Ά sourced straight from ./include/uapi/drm, dated October 2026, and yes that's a real date, no I don't make the rules π go run some batch buffers, stay hydrated, keep your pad at MBZ, periodt. πβ¨
π¦ 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