STRUCT XE_REG(9)
π 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 ofxe_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, oneu32, 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 β¨
- Kernel file
./drivers/gpu/drm/xe/regs/xe_reg_defs.h XE_REG_ADDR_MAX(9)struct xe_reg_mcr(9)XE_REG_OPTION_MASKED(9)XE_REG_OPTION_VF(9)XE_REG_INITIALIZER(9)XE_REG(9)XE_REG_MCR(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms