gen8_oa_read(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gen8_oa_read(9) β€” the kernel API manual, but make it make sense

okay so bestie, welcome to the <cyan>Kernel API Manual</cyan> entry for gen8_oa_read ✨ no cap, this one's genuinely cute once you get the vibe.


🌸 NAME 🌸

gen8_oa_read β€” copy status records then buffered OA reports πŸ’–


✨ SYNOPSIS ✨

int gen8_oa_read (struct i915_perf_stream *stream , char __user *buf ,
       size_t count , size_t *offset );

πŸŽ€ ARGUMENTS πŸŽ€

  • stream β€” an i915-perf stream, and it's gotta be one that was opened for OA metrics πŸ‘‘
  • buf β€” the destination buffer that userspace handed over 🫢
  • count β€” how many bytes userspace actually wants to read, literally the byte count
  • offset β€” (inout) the current position for writing into buf, so it goes in and comes back out updated πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

So what this icon does: it checks the OA unit status registers, and if it needs to, it appends the corresponding status records for userspace β€” think a buffer-full condition, that kind of thing β€” and then it kicks off appending any buffered OA reports. it's giving "cleanup then deliver" main character energy πŸ’…

It updates offset according to the number of bytes successfully copied into the userspace buffer. tracking the receipts, fr fr ✨

NB: some data may be successfully copied to the userspace buffer even if an error is returned, and that's reflected in the updated offset. so yeah β€” error doesn't always mean nothing happened, bestie 😭 keep an eye on that offset πŸ™ˆ

πŸ”₯ RETURN πŸ”₯

zero on success, or a negative error code πŸ“


🌈 SEE ALSO 🌈

Kernel file ./drivers/gpu/drm/i915/i915_perf.c plus the whole friend group:


that's the whole page, bestie, you ate that 🫢 this one lives in <purple>./drivers/gpu/drm/i915</purple> and it's dated <mint>October 2026</mint>, and yes the footer still says gen8_oa_read(9) because we stay on brand πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from