vb2_wait_for_all_buffers(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… vb2_wait_for_all_buffers(9) β€” a.k.a. the "bestie, please just come back" function

okay so you found it β€” this is the page for vb2_wait_for_all_buffers(9), straight out of the Kernel API Manual, no cap. It lives in the kernel, it deals with videobuf2, and it's here to teach you how to wait like a main character. πŸŽ€


✨ NAME ✨

vb2_wait_for_all_buffers β€” literally waits until all the buffers are given back to vb2. That's the whole vibe check. πŸ¦‹


✨ SYNOPSIS ✨

int vb2_wait_for_all_buffers (struct vb2_queue *q );

✨ ARGUMENTS ✨

  • q β€” pointer to a struct vb2_queue holding your videobuf2 queue. like, the queue. the whole queue. 🫢

✨ DESCRIPTION ✨

so this function just… sits there and waits. patiently. iconically. πŸ’… It waits until all the buffers that were handed off to the driver by vb2_ops->buf_queue get given back to vb2 via vb2_buffer_done.

she is intended to be called with all locks taken πŸ‘‘ β€” for example, from the vb2_ops->stop_streaming callback. that's the whole assignment. don't come for her with your unlocked nonsense, that's not the vibe she was designed for. πŸ™ˆ


✨ SEE ALSO ✨

kernel file ./include/media/videobuf2-core.h plus the entire friend group, in this exact order, no cutting the line:

enum vb2_memory(9), struct vb2_mem_ops(9), struct vb2_plane(9), enum vb2_io_modes(9), enum vb2_buffer_state(9), struct vb2_buffer(9), struct vb2_ops(9), struct vb2_buf_ops(9), struct vb2_queue(9), vb2_queue_allows_cache_hints(9), vb2_plane_vaddr(9), vb2_plane_cookie(9), vb2_buffer_done(9), vb2_discard_done(9), vb2_core_querybuf(9), vb2_core_reqbufs(9), vb2_core_create_bufs(9), vb2_core_prepare_buf(9), vb2_core_remove_bufs(9), vb2_core_qbuf(9), vb2_core_dqbuf(9), vb2_core_streamon(9), vb2_core_streamoff(9), vb2_core_expbuf(9), vb2_core_queue_init(9), vb2_core_queue_release(9), vb2_queue_error(9), vb2_mmap(9), vb2_get_unmapped_area(9), vb2_core_poll(9), vb2_read(9), vb2_write(9), vb2_thread_fnc(9), vb2_thread_start(9), vb2_thread_stop(9), vb2_is_streaming(9), vb2_fileio_is_active(9), vb2_get_num_buffers(9), vb2_is_busy(9), vb2_get_drv_priv(9), vb2_set_plane_payload(9), vb2_get_plane_payload(9), vb2_plane_size(9), vb2_start_streaming_called(9), vb2_clear_last_buffer_dequeued(9), vb2_get_buffer(9), vb2_buffer_in_use(9), vb2_verify_memory_type(9), vb2_request_object_is_buffer(9), vb2_request_buffer_cnt(9).

like, go read them. respectfully. πŸ”₯


ngl the entire personality of this page is "wait for your buffers to come home." that's it. that's the function. 🧚

and that's the page, bestie πŸ’– this lil sign-off is brought to you by ./include/media, dated October 2026 β€” the source/version and date, in case you were wondering where all the lore came from. mwah. πŸ’œπŸŒΈ

πŸ“¦ where this page comes from