vb2_buffer_done(9)
π
vb2_buffer_done(9) β the Kernel API Manual said bestie, letβs return this buffer π«Ά
β¨ NAME β¨
vb2_buffer_done β inform videobuf2 that an operation on a buffer is finished, and do it with main character energy π
πΈ SYNOPSIS πΈ
void vb2_buffer_done (struct vb2_buffer *vb , enum vb2_buffer_state
state );
π ARGUMENTS π
vbβ pointer tostruct vb2_bufferto be used. literally the buffer in question, no cap πstateβ state of the buffer, as defined byenum vb2_buffer_state. EitherVB2_BUF_STATE_DONEif the operation finished successfully,VB2_BUF_STATE_ERRORif the operation finished with an error, orVB2_BUF_STATE_QUEUED. vibe check for your buffer, basically β¨
π DESCRIPTION π
okay so this function should be called by the driver after a hardware operation on a buffer is finished and the buffer may be returned to userspace. Thatβs the moment. π«Ά
After that, the driver cannot use this buffer anymore until it is queued back to it by videobuf by the means of the vb2_ops->buf_queue callback. Only buffers previously queued to the driver by vb2_ops->buf_queue can be passed to this function. No random buffers, bestie β security guard energy π
While streaming, a buffer can only be returned in state DONE or ERROR. The vb2_ops->start_streaming op can also return them in case the DMA engine cannot be started for some reason. In that case, the buffers should be returned with state QUEUED to put them back into the queue. put them back in the group chat, basically π
π¦ SEE ALSO π¦
the whole friend group is here, no one left behind, periodt π
- Kernel file
./include/media/videobuf2-core.h 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_discard_done(9),vb2_wait_for_all_buffers(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)
made with π from the ./include/media source/version corner, October 2026 edition β mwah π
π¦ 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