xe_mmio_read64_2x32(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

okay bestie, welcome to the Kernel API Manual glow-up for xe_mmio_read64_2x32(9) 🫢✨ this one is all about reading a 64-bit register the safe way, no cap.

πŸ’– NAME πŸ’–

xe_mmio_read64_2x32 β€” read a 64-bit register as two 32-bit reads.

🌸 SYNOPSIS 🌸

u64 xe_mmio_read64_2x32 (struct xe_mmio *mmio , struct xe_reg reg );

πŸŽ€ ARGUMENTS πŸŽ€

  • mmio β€” MMIO target πŸ’…
  • reg β€” register to read value from ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜•: even though Intel GPUs have some 64-bit registers, the hardware officially only supports GTTMMADR register reads of 32 bits or smaller. and yes, even if a readq operation may return a reasonable value, that violation of the spec should not be relied upon β€” all 64-bit register reads should be performed as two 32-bit reads of the upper and lower dwords. periodt πŸ’…

when you're reading registers that may be changing (think counters), a rollover of the lower dword between the two 32-bit reads can be problematic 😭. this function attempts to ensure the upper dword has stabilized before returning the 64-bit value. iconique behavior, honestly πŸ‘‘βœ¨

note that because this function may re-read the register multiple times while waiting for the value to stabilize, it should not be used to read any registers where read operations have side effects. seriously bestie, don't do it πŸ™ˆπŸ’€

Returns: the value of the 64-bit register. slay πŸŽ€

🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/xe/xe_mmio.c plus these iconique friends:


xoxo, your Kernel API Manual bestie β€” source/version ./drivers/gpu/drm/xe, dated October 2026, page xe_mmio_read64_2x32(9) πŸ’–πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from