STRUCT XE_OA_BUFFER(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so this is struct xe_oa_buffer β€” the state of the stream OA buffer πŸ’– that's it, that's the whole personality. it's the struct that keeps track of where your OA buffer is at. lowkey important, highkey iconic.

so real quick, the manual name for this one is struct xe_oa_buffer(9) from the Kernel API Manual β€” writing it down so you don't forget bestie πŸŽ€


🌸 SYNOPSIS 🌸

here's the whole vibe, copy-pasted exactly because we do not touch the code:

struct xe_oa_buffer {
    const struct xe_oa_format *format;
    struct xe_bo *bo;
    void *bounce;
    spinlock_t ptr_lock;
    u32 head;
    u32 tail;
    u32 circ_size;
 };

πŸ¦‹ Members πŸ¦‹

okay now the good part β€” meet the members, they're all main characters in their own way 🫢

  • format β€” the data format. that's it, that's her whole job ✨
  • bo β€” the xe_bo that's backing the OA buffer. the literal foundation, no cap πŸ’…
  • bounce β€” a bounce buffer that gets used with the xe_map layer. yes it's called bounce. yes we love her πŸ™ˆ
  • ptr_lock β€” a spinlock_t guarding the reads and writes to the head/tail pointers. tiny lock, huge responsibility πŸ”₯
  • head β€” the cached head you read from. that's where you're at, bestie ⭐
  • tail β€” the last verified cached tail, i.e. where the HW has actually finished writing. note the "verified" β€” this one's been checked, fr fr πŸ’€
  • circ_size β€” the effective circular buffer size, for Xe2+. so like, newer hardware energy πŸ’œ

πŸŽ€ SEE ALSO πŸŽ€

go read these next, they're all in the kernel file ./drivers/gpu/drm/xe/xe_oa_types.h and they're all linked together like one big friend group 🌈

  • struct xe_oa_format(9)
  • struct xe_oa_unit(9)
  • struct xe_oa_gt(9)
  • struct xe_oa(9)
  • struct xe_oa_stream(9)

aaaaand that's the whole page bestie πŸ“ this little gem lives over in ./drivers/gpu/drm/xe and it's dated October 2026 β€” so yeah, she's from the future, periodt πŸ‘‘βœ¨πŸ§š

πŸ“¦ where this page comes from