Deep Dive into Today's Videobuf2 Framework
summary
Step-by-step walkthrough of the videobuf2 internals with code paths and exact callbacks: shows how request_buffers, queue/dq/buffer_done, stream_on/stream_off map to vb2 core and vb2 memops and when allocators (dma-contig, sg/dmasg, vmalloc) are chosen; demonstrates dma-buf export/import flow with device addresses, attach/map/unmap/finish calls and cache syncs; uses an MFC driver example on kernel 5.14-rc7 and verifies the zero-copy pipeline and buffer lifecycle end-to-end.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 0:48Videobuf2 Introduction
- 2:37VB2 Framework Overview
- 4:52VB2QN
- 8:08VB2 Memo
- 11:20Memory Address
- 13:44Buff Queue
- 17:05Buffer State
- 18:08BuffQueue
- 19:39BufferedValidate
- 23:28Request Buffers
- 25:21QBUFF
- 27:18User Pointer
- 30:47Export Buffer Adapter
- 32:32Export Buffer Call
- 34:25VB2 Buffer Done
- 38:14VB2 Stream
- 39:02VB2 Stream Off
- 39:54VB2 Core Queue Release
related talks
46mV4L2 Video Decoder/Encoder Development Journey
41mWalking Through the Linux-Based Graphics Stack
38mVideo4Zephyr: From Basic APIs Towards a Full-fledged Video Subsystem
17mVirtio data flow: There and Back Again
46mV4L2 Video Decoder/Encoder Development Journey
37mIntegrating Hardware-accelerated Video Decoding with the Display Stack
33mStateless V4L2 Video Encoding
44mKernel TEE subsystem BoF
