VIS-110 · Embedded Vision · Advanced
V4L2 Driver Development — full syllabus
Writing and debugging Video4Linux2 drivers, including the media controller graph for complex pipelines.
Who this course is for
Kernel and driver engineers who must write a camera sensor driver and wire it into a media-controller pipeline that negotiates formats end to end without silent mismatches.
Prerequisites
- C programming and a previously built-and-loaded kernel module
- I2C fundamentals and register-level device programming
- Basic device tree syntax
- V4L2 userspace exposure (v4l2-ctl) is helpful
Course outline
Day 1 — V4L2 architecture and the media graph
- Video devices, subdevices and why sensors are not /dev/video nodes
- Media controller: entities, pads and immutable vs dynamic links
- Async subdevice probing and fwnode/device-tree bindings (ports, endpoints, link-frequencies)
- The graph for a real SoC receiver: sensor, CSI-2 RX, ISP, DMA engine
- Where the kernel's camera drivers live and how to read them
Day 2 — Buffers and memory
- videobuf2: queue setup, buf_ops and the streaming state machine
- dma-contig vs dma-sg allocators and when each is correct
- REQBUFS vs CREATE_BUFS and buffer ownership
- DMABUF export and import: zero-copy handoff to another device or userspace
- Cache coherency and the sync ioctls you must not skip
Day 3 — Writing the sensor driver
- Driver skeleton: probe, regmap over I2C, power and clock sequencing
- Mode tables: resolution, frame interval, link frequency and their interplay
- Register programming: init sequences, gain/exposure mapping to device units
- V4L2 controls: V4L2_CID_EXPOSURE/GAIN/TEST_PATTERN and control handlers
- Pad formats, selection rectangles (crop/compose) and get/set_fmt semantics
Day 4 — Negotiation, streaming and debugging
- Pipeline negotiation: how formats propagate pad to pad and where it breaks
- Link validation at stream-on time and the errors it raises
- s_stream ordering across subdevices and the races it invites
- media-ctl graph configuration; v4l2-ctl capture and v4l2-compliance testing
- Debugging with ftrace events, dynamic debug and the receiver's error counters
Hands-on labs
- Lab: Enumerate a live media graph with media-ctl -p, configure a format pipeline and capture frames with v4l2-ctl
- Lab: Write a sensor driver skeleton on real hardware: probe from device tree, power/clock sequencing and a register init sequence that survives review
- Lab: Implement exposure and gain controls plus a test-pattern mode, and validate the driver with v4l2-compliance
- Lab: Stream through videobuf2 and export a frame as DMABUF to a second consumer, proving zero-copy with buffer addresses
- Lab: Diagnose two seeded pipeline failures — a format mismatch and an s_stream ordering bug — using tracing and error counters, and document the evidence
Capstone project
Take a raw sensor from a device-tree node to validated application buffers on real hardware: driver with mode table and controls, media-graph configuration, and captured frames as proof — delivered with a debug log of every failure encountered along the way, the tool output that identified it, and the fix.
What you leave with
- A working sensor driver skeleton you can adapt to your own parts
- Media-controller graph fluency: entities, pads, links and negotiation
- The videobuf2/DMABUF buffer model and its coherency rules
- A v4l2-ctl/media-ctl/v4l2-compliance/ftrace debugging toolkit
- Device-tree binding patterns for camera sensors and receivers
Upcoming dates
| Dates | Where | Seats | Early bird | Regular | |
|---|---|---|---|---|---|
| 1 Nov – 4 Nov 20264 full days | RiyadhIn person · KAFD Conference Centre | 8 of 14 | — | SAR 12,000 | |
| 8 Nov – 11 Nov 20264 full days | Kuwait CityIn person · Al Hamra Tower | 3 of 14 | KWD 890until 9 Oct | ||
| 15 Nov – 18 Nov 20264 full days | MuscatIn person · Knowledge Oasis Muscat | 8 of 14 | OMR 1,110until 16 Oct | ||
| 15 Nov – 24 Nov 20268 half-days | Gulf bandLive online · 09:00–13:00 GMT+3 | 6 of 20 | US$2,070until 16 Oct | ||
| 16 Nov – 19 Nov 20264 full days | OttawaIn person · Kanata North Tech Park | 3 of 14 | CAD 3,920until 17 Oct | ||
| 23 Nov – 26 Nov 20264 full days | TorontoIn person · MaRS Discovery District | 8 of 14 | CAD 3,920until 24 Oct | ||
| 23 Nov – 2 Dec 20268 half-days | Europe bandLive online · 09:00–13:00 CET | 11 of 20 | US$2,070until 24 Oct | ||
| 30 Nov – 3 Dec 20264 full days | LondonIn person · Shoreditch Works | 3 of 14 | GBP 2,250until 31 Oct | ||
| 30 Nov – 9 Dec 20268 half-days | Americas bandLive online · 13:00–17:00 ET | 16 of 20 | US$2,070until 31 Oct | ||
| 7 Dec – 10 Dec 20264 full days | BerlinIn person · Factory Görlitzer Park | 8 of 14 | EUR 2,650until 7 Nov |
Book a seat, or bring this course to your team
Seats can be reserved online; private delivery runs on-site or live online, adapted to your stack.
Questions about fit or prerequisites? Email hello@kernelsystems.academy. To save this syllabus, print this page to PDF from your browser.