STRUCT XE_OA(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… struct xe_oa β€” NAME πŸ’…

okay so this is struct xe_oa(9) from the Kernel API Manual, and it's basically the OA device level information ✨ β€” like, the whole vibe of the OA device in one struct. Obsessed.


🌸 SYNOPSIS 🌸

struct xe_oa {
    struct xe_device *xe;
    struct kobject *metrics_kobj;
    struct mutex metrics_lock;
    struct idr metrics_idr;
    const struct xe_oa_format *oa_formats;
    unsigned long format_mask[BITS_TO_LONGS(__XE_OA_FORMAT_MAX)];
    u16 oa_unit_ids;
};

Like, that's the whole thing. Iconic. No cap. 🫢


πŸŽ€ Members πŸŽ€

so here's the field-by-field breakdown bestie, every single one, we're not skipping a single member πŸ’–

  • xe β€” back pointer to xe device. like, it points right back home to the xe device, main character energy fr fr 🏠
  • metrics_kobj β€” kobj for metrics sysfs. yep, the kobject that handles the metrics sysfs situation ✨
  • metrics_lock β€” lock protecting add/remove configs. it's giving bodyguard energy, keeping those add/remove config ops from stepping on each other πŸ’…
  • metrics_idr β€” List of dynamic configurations (struct xe_oa_config). literally a whole list of the dynamic configs, we love a collection πŸ‘‘
  • oa_formats β€” tracks all OA formats across platforms. every platform, every OA format, all tracked here πŸ¦‹
  • format_mask β€” tracks valid OA formats for a platform. it's the vibe check for which formats are valid on a given platform, typed as unsigned long format_mask[BITS_TO_LONGS(__XE_OA_FORMAT_MAX)] β€” yes that whole expression, don't @ me 🌈
  • oa_unit_ids β€” tracks oa unit ids assigned across gt's. keeping tabs on those oa unit ids spread across the gt's, someone's gotta do it ⭐

πŸ¦‹ SEE ALSO πŸ¦‹

go read these next bestie (Kernel file ./drivers/gpu/drm/xe/xe_oa_types.h β€” that's where all the lore lives πŸ”₯):

  • struct xe_oa_format(9)
  • struct xe_oa_unit(9)
  • struct xe_oa_gt(9)
  • struct xe_oa_buffer(9)
  • struct xe_oa_stream(9)
πŸ’€ ngl these all hang out in ./drivers/gpu/drm/xe/xe_oa_types.h so like, tell xe_oa_types.h I said hi okay πŸ™ˆ

🌸 cute sign-off 🌸

so this whole page comes from ./drivers/gpu/drm/xe, dated October 2026, and it's literally struct xe_oa(9) β€” periodt πŸ’œπŸŽ€πŸ’– slay, go forth and read your header files bestie 🧚✨

πŸ“¦ where this page comes from