STRUCT DRM_XE_QUERY_OA_UNITS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 struct drm_xe_query_oa_units(9) 🌸

okay bestie, welcome to the Kernel API Manual β€” yes, THE Kernel API Manual, we're in the big leagues now πŸ’…


✨ NAME ✨

struct drm_xe_query_oa_units β€” describe OA units πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

struct drm_xe_query_oa_units {
    __u64 extensions;
    __u32 num_oa_units;
    __u32 pad;
    __u64 oa_units[];
 };

πŸ‘‘ Members πŸ‘‘

  • extensions β€” pointer to the first extension struct, if any. like, if you've got extensions. no pressure 🫢
  • num_oa_units β€” how many OA units got returned in oau[]. the headcount, basically ✨
  • pad β€” MBZ (must be zero, bb β€” don't be spicy with it) πŸ’€
  • oa_units β€” the struct drm_xe_oa_unit array returned for this device. it's written below as a u64 array to avoid problems with nested flexible arrays with some compilers. literally just dodging compiler drama, iconic behavior honestly 🌈

πŸ’– Description πŸ’–

so here's the tea: if you make a query with a struct drm_xe_device_query where .query is equal to DRM_XE_DEVICE_QUERY_OA_UNITS, then the reply uses struct drm_xe_query_oa_units in .data. that's the whole vibe check βœ…

OA unit properties for all OA units can be accessed using a code block such as the one below β€” no cap, this is the way 🧚

struct drm_xe_query_oa_units *qoa;
struct drm_xe_oa_unit *oau;
u8 *poau;

// malloc qoa and issue DRM_XE_DEVICE_QUERY_OA_UNITS. Then:
poau = (u8 *)qoa->oa_units[0];
for (int i = 0; i < qoa->num_oa_units; i++) {
        oau = (struct drm_xe_oa_unit *)poau;
        // Access 'struct drm_xe_oa_unit' fields here
        poau += sizeof(*oau) + oau->num_engines * sizeof(oau->eci[0]);
}

like, you're literally pointer-walking through the array one OA unit at a time, stepping past each one plus its engines. it's giving main character energy πŸ”₯


πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, fr fr β€” go say hi to all of them πŸ’œ

  • 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)
  • 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_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)
  • 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 whole page, bestie!! 🫢 this little gem lives in ./include/uapi/drm and it was dated October 2026 β€” go off, future manpage πŸ‘‘βœ¨ bye pookie, go query some OA units πŸ’–

πŸ“¦ where this page comes from