i915_oa_stream_init(9)
π i915_oa_stream_init(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β this little icon is i915_oa_stream_init, and it's the vibe-check gatekeeper for OA streams. let's get into it π
πΈ NAME πΈ
i915_oa_stream_init β validates the combined props for an OA stream, then inits it. fr fr, it's the "does this whole config actually make sense together" check π
β¨ SYNOPSIS β¨
int i915_oa_stream_init (struct i915_perf_stream *stream , struct
drm_i915_perf_open_param *param , struct perf_open_properties *props );
π«Ά ARGUMENTS π«Ά
streamβ an i915 perf stream, the main character of this whole situation πparamβ the open parameters that got passed toDRM_I915_PERF_OPENpropsβ the property state that configures the stream (and yeah, these get individually validated elsewhere, so don't worry about that part here π§)
π¦ DESCRIPTION π¦
so read_properties_unlocked validates properties in isolation β one at a time, each on its own. but bestie, that doesn't ensure the combination necessarily makes sense π like, every ingredient can be fine and the recipe can still be a mess. that's literally what this function is here for.
at this point it's already been determined that userspace wants a stream of OA metrics. so far so good. but we still need to further validate that the combined properties are OK. vibe check on the whole group chat, not just each member individually π
and if the configuration does make sense? slay. then we allocate memory for a circular OA buffer and apply the requested metric set configuration. iconic behavior, no cap π₯
π RETURN π
zero on success, or a negative error code. that's it, that's the whole thing π
π SEE ALSO π
kernel file ./drivers/gpu/drm/i915/i915_perf.c, plus a whole friend group of related icons:
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_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)
π reminder bestie: read every single one of those before you go poking at perf streams, iykyk
okay that's the whole page!! this one came from ./drivers/gpu/drm/i915, dated October 2026 β go drink some water and go read the kernel source, ily ππβ¨
π¦ 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