STRUCT DRM_XE_QUERY_ENGINES(9)

๐Ÿ“ฆ version 7.3.1, in nixpkgs unstable

๐Ÿ’… struct drm_xe_query_engines โ€” describe engines

okay so bestie, welcome to the Kernel API Manual for struct drm_xe_query_engines. yes it's a whole manpage about a struct. and yes it's kind of iconic. let's get into it โœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

struct drm_xe_query_engines {
    __u32 num_engines;
    __u32 pad;
    struct drm_xe_engine engines[];
};

like, that's the whole thing. three members. short king energy. ๐Ÿ‘‘


๐ŸŽ€ Members ๐ŸŽ€

  • num_engines โ€” the number of engines handed back to you inside engines. that's the count, that's it, it's literally counting for you. ๐Ÿงฎ
  • pad โ€” MBZ, bestie. Must Be Zero. do not touch, do not fill, do not be quirky about it. it stays zero. ๐Ÿ™ˆ
  • engines โ€” the actual returned engines for this device. this is the main character right here. ๐Ÿ”ฅ

๐Ÿฆ‹ Description ๐Ÿฆ‹

so here's the vibe: if you make a query with a struct drm_xe_device_query and its .query field is equal to DRM_XE_DEVICE_QUERY_ENGINES, then the reply comes back as an array of struct drm_xe_query_engines, sitting all cute inside .data. that's the whole flow, no cap. โœจ

lowkey important: .query has to be DRM_XE_DEVICE_QUERY_ENGINES for this to happen. set it to something else and you're getting something else, periodt.

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

catch all these besties in the kernel file ./include/uapi/drm/xe_drm.h ๐Ÿ’–

  • 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)
  • 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_exec(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)

like, that's a lot of friends. they all showed up to the party. ๐Ÿซถ


โœจ that's the whole page, bestie โœจ

this lil slice of knowledge lives in ./include/uapi/drm, dated October 2026, and it came to you courtesy of the Kernel API Manual. go read your structs, hydrate, and slay. ๐Ÿ’…๐Ÿ’–๐ŸŽ€

๐Ÿ“ฆ where this page comes from