i915_oa_read(9)
π i915_oa_read(9) β a Kernel API Manual moment
okay bestie, welcome to i915_oa_read(9), straight out of the Kernel API Manual β¨ this one is short and sweet and honestly kind of a vibe β it's the little function that does basically one thing and does it iconically.
πΈ NAME πΈ
i915_oa_read β literally just calls through to &i915_oa_ops->read. that's it. that's the whole personality. no cap, it's giving "middle management" and we respect it π«Ά
β¨ SYNOPSIS β¨
int i915_oa_read (struct i915_perf_stream *stream , char __user *buf ,
size_t count , size_t *offset );
look at her go π four whole arguments, all of them important, none of them optional.
π ARGUMENTS π
streamβ an i915-perf stream, opened for OA metrics. this is the main character of the whole situation πbufβ the destination buffer, handed to us by userspace. their buffer, their rules (jk, our rules) πcountβ how many bytes userspace wants to read. the literal vibe check of the read πoffsetβ (inout) the current position for writing intobuf. she goes in, she gets updated, she comes out changed β character development fr fr π¦
π DESCRIPTION π
So what does it do? it updates offset according to the number of bytes successfully copied into the userspace buffer. that's it. that's the tea β the offset bookkeeping is the entire plot, and honestly? we're obsessed with the efficiency π
π₯ RETURN π₯
zero on success β¨ or a negative error code π (ngl the negative error code is never the fun outcome, but she's part of the story too).
π SEE ALSO π
bestie, this is the friend group. every single one of them. hydrate before reading:
- the Kernel file
./drivers/gpu/drm/i915/i915_perf.cπ i915 Perf Overview(9)i915 Perf History and Comparison with Core Perf(9)OA Tail Pointer Race(9)struct perf_open_properties(9)oa_buffer_check_unlocked(9)append_oa_status(9)append_oa_sample(9)gen8_append_oa_reports(9)gen8_oa_read(9)gen7_append_oa_reports(9)gen7_oa_read(9)i915_oa_wait_unlocked(9)i915_oa_poll_wait(9)oa_get_render_ctx_id(9)oa_put_render_ctx_id(9)i915_oa_stream_enable(9)i915_oa_stream_disable(9)i915_oa_stream_init(9)i915_perf_read(9)i915_perf_poll_locked(9)i915_perf_poll(9)i915_perf_enable_locked(9)i915_perf_disable_locked(9)i915_perf_ioctl_locked(9)i915_perf_ioctl(9)i915_perf_destroy_locked(9)i915_perf_release(9)i915_perf_open_ioctl_locked(9)read_properties_unlocked(9)i915_perf_open_ioctl(9)i915_perf_register(9)i915_perf_unregister(9)i915_perf_add_config_ioctl(9)i915_perf_remove_config_ioctl(9)i915_perf_init(9)i915_perf_fini(9)i915_perf_ioctl_version(9)
like, genuinely, read them all. iykyk π«
okay that's the page!! mwah π this little cutie lives in ./drivers/gpu/drm/i915, and she's stamped October 2026 in the Kernel API Manual β screenshot it, frame it, put it on the fridge π§π periodt.
π¦ 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