i915_perf_read(9)
π i915_perf_read(9) π
okay bestie, so this is i915_perf_read(9) from the Kernel API Manual β and it's literally the entry point for handling a read() FOP on i915 perf stream FDs, no cap. Let me walk you through it π«Ά
β¨ SYNOPSIS β¨
ssize_t i915_perf_read (struct file *file , char __user *buf , size_t
count , loff_t *ppos );
π ARGUMENTS π
fileβ an i915 perf stream file, periodtbufβ the destination buffer, handed to us by userspace π¦countβ how many bytes userspace is trying to read, iykykpposβ (inout) the file seek position β and honestly, it's not even used π
πΈ DESCRIPTION πΈ
So this is the entry point for handling a read on a stream file descriptor from userspace. Most of the actual work is lowkey left to i915_perf_read_locked and i915_perf_stream_ops->read β but here's the thing: to save having stream implementations (of which we might have multiple later, fr fr) we handle the blocking read right here β¨
We can also consistently treat trying to read from a disabled stream as an IO error, so implementations can totally assume the stream is enabled while reading. Iconic behaviour tbh π
π₯ RETURN π₯
The number of bytes copied, or a negative error code if something goes wrong π
π SEE ALSO π
Kernel file ./drivers/gpu/drm/i915/i915_perf.c β plus the whole friend group:
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)i915_oa_read(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_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)
and that's the whole page, bestie π this one's brought to you by the fine people at ./drivers/gpu/drm/i915, dated October 2026 β mwah, slay, see u in the next manpage πβ¨π
π¦ 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