STRUCT XE_REG(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct xe_reg(9) πŸŽ€

okay bestie, so this is a page from the Kernel API Manual β€” yes, the actual kernel manual, and we're about to make it make sense. welcome to struct xe_reg, the little register definition that could. πŸ¦‹


✨ NAME ✨

struct xe_reg β€” Register definition πŸ’…


✨ SYNOPSIS ✨

struct xe_reg {
    union {
      struct {
        u32 addr:const_ilog2(XE_REG_ADDR_MAX);
        u32 masked:1;
        u32 mcr:1;
        u32 vf:1;
      };
      u32 raw;
    };
 };

like, look at her. bitfields AND a union. main character energy honestly. πŸ‘‘


✨ Members ✨

  • {unnamed_union} β€” anonymous 🫢 (she has no name, she's mysterious, she's a union)
  • {unnamed_struct} β€” anonymous too πŸ™ˆ (struct with no name, we love a lowkey icon)
  • addr β€” address πŸ“
  • masked β€” this register is "masked", meaning the upper 16 bits are used to identify which bits get updated on the lower bits ✨ (yes, 16 whole bits doing identification duty, no cap)
  • mcr β€” register is multicast/replicated in the hardware and needs special handling ⚠️. literally any register with this set should also use a type of xe_reg_mcr_t. it's only here so the few places that deal with MCR registers specially (xe_sr.c) and tests using the raw value can inspect it πŸ‘€
  • vf β€” register is accessible from the Virtual Function πŸ’œ
  • raw β€” Raw value with both address and options πŸ”₯ (the whole thing, packed up, one u32, iconic)

✨ Description ✨

so basically 🧚 this is the register definition that gets used by the individual register. and here's the plot twist: even though the same definition is used for both xe_reg and xe_reg_mcr, they use different internal APIs for accesses. same fit, different function. periodt. πŸ’…


✨ SEE ALSO ✨

go read them, i'll wait. πŸ’– 🌸


ok that's the whole page bestie, no notes. πŸŽ€

and for the cute sign-off: this icon lives over in ./drivers/gpu/drm/xe/regs, dated October 2026, and you can find her again any time at struct xe_reg(9). πŸ¦‹βœ¨ bye ily! 🌈

πŸ“¦ where this page comes from