STRUCT I915_PERF_STREAM_OPS(9)
okay so bestie π this is the struct i915_perf_stream_ops(9) page from the Kernel API Manual β yes, that manual name is staying right here near the top, cute and accounted for π«Ά
πΈ NAME πΈ
struct i915_perf_stream_ops β the OPs to support a specific stream type. literally the plug for one stream type, periodt β¨
β¨ SYNOPSIS β¨
struct i915_perf_stream_ops {
void (*enable)(struct i915_perf_stream *stream);
void (*disable)(struct i915_perf_stream *stream);
void (*poll_wait)(struct i915_perf_stream *stream, struct file
*file, poll_table *wait);
int (*wait_unlocked)(struct i915_perf_stream *stream);
int (*read)(struct i915_perf_stream *stream, char __user *buf,
size_t count, size_t *offset);
void (*destroy)(struct i915_perf_stream *stream);
};
π Members π
enableβ Enables the collection of HW samples, either in response toI915_PERF_IOCTL_ENABLEor implicitly called when stream is opened withoutI915_PERF_FLAG_DISABLEDπdisableβ Disables the collection of HW samples, either in response toI915_PERF_IOCTL_DISABLEor implicitly called before destroying the stream.poll_waitβ Callpoll_wait, passing a wait queue that will be woken once there is something ready to read for the stream.wait_unlockedβ For handling a blocking read, wait until there is something to ready to read for the stream. E.g. wait on the same wait queue that would be passed topoll_wait.readβ Copy buffered metrics as records to userspace:bufβ the userspace, destination buffercountβ the number of bytes to copy, requested by userspaceoffsetβ zero at the start of the read, updated as the read proceeds, it represents how many bytes have been copied so far and the buffer offset for copying the next record.
Copy as many buffered i915 perf samples and records for this stream to userspace as will fit in the given buffer.
Only write complete records; returning -ENOSPC if there isn't room for a complete record.
Return any error condition that results in a short read such as -ENOSPC or -EFAULT, even though these may be squashed before returning to userspace.
destroyβ Cleanup any stream specific resources.
The stream will always be disabled before this is called.
π¦ SEE ALSO π¦
go peek at the kernel file ./drivers/gpu/drm/i915/i915_perf_types.h β and also struct i915_perf_stream(9) and struct i915_oa_ops(9). iykyk π₯
mwah π this one lives under ./drivers/gpu/drm/i915 and is dated October 2026 β iconic little kernel cameo, no cap π
π¦ 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