VIS-110 · Embedded Vision

V4L2 Driver Development

Writing and debugging Video4Linux2 drivers, including the media controller graph for complex pipelines.

Advanced 4 days in person8 half-days online Max 14 in person

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 moduleI2C fundamentals and register-level device programmingBasic device tree syntaxV4L2 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

Labs follow the academy model — 35% principles, 20% guided investigation, 45% engineering studio. Every claim you make in a lab is backed by a trace, a counter or a measurement you captured yourself. How we teach

  1. Lab: Enumerate a live media graph with media-ctl -p, configure a format pipeline and capture frames with v4l2-ctl
  2. Lab: Write a sensor driver skeleton on real hardware: probe from device tree, power/clock sequencing and a register init sequence that survives review
  3. Lab: Implement exposure and gain controls plus a test-pattern mode, and validate the driver with v4l2-compliance
  4. Lab: Stream through videobuf2 and export a frame as DMABUF to a second consumer, proving zero-copy with buffer addresses
  5. Lab: Diagnose two seeded pipeline failures — a format mismatch and an s_stream ordering bug — using tracing and error counters, and document the evidence

This course uses lab hardware. In-person cohorts get boards on the desk; online cohorts get remote board access over SSH and JTAG.

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

How it runs

Every course follows the same model: 35% principles, 20% guided investigation, 45% engineering studio. You leave with working code, raw measurements and an evidence-based report — not a certificate of attendance. Read the methodology or see a full sample lesson.

Material is adapted to your kernel version, hardware and workload before a private delivery. For public cohorts, the environment is provided and configured.

Questions

Who is this course 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. It sits at advanced level within the Embedded Vision track.

What do I need to know already?

Specific prerequisites for this course: 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. We confirm levels before the cohort starts and adapt if a group is stronger or weaker than expected.

Can this run privately for my team?

Yes. Any course runs on-site at your offices anywhere, or live online for a distributed team, with labs adapted to your hardware and codebase.

What is the difference between in-person and online?

In person is 4 full days with hardware on your desk, capped at 14. Online is 8 half-day sessions across about two weeks so you can keep working, capped at 20, with remote lab access.

Do you invoice companies?

Yes. Purchase orders are accepted and invoicing is available in USD, EUR, GBP, SAR and CAD.

Upcoming dates

DatesWhereSeatsEarly birdRegular
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 OctKWD 990
15 Nov – 18 Nov 20264 full days MuscatIn person · Knowledge Oasis Muscat 8 of 14 OMR 1,110until 16 OctOMR 1,230
15 Nov – 24 Nov 20268 half-days Gulf bandLive online · 09:00–13:00 GMT+3 6 of 20 US$2,070until 16 OctUS$2,300
16 Nov – 19 Nov 20264 full days OttawaIn person · Kanata North Tech Park 3 of 14 CAD 3,920until 17 OctCAD 4,350
23 Nov – 26 Nov 20264 full days TorontoIn person · MaRS Discovery District 8 of 14 CAD 3,920until 24 OctCAD 4,350
23 Nov – 2 Dec 20268 half-days Europe bandLive online · 09:00–13:00 CET 11 of 20 US$2,070until 24 OctUS$2,300
30 Nov – 3 Dec 20264 full days LondonIn person · Shoreditch Works 3 of 14 GBP 2,250until 31 OctGBP 2,500
30 Nov – 9 Dec 20268 half-days Americas bandLive online · 13:00–17:00 ET 16 of 20 US$2,070until 31 OctUS$2,300
7 Dec – 10 Dec 20264 full days BerlinIn person · Factory Görlitzer Park 8 of 14 EUR 2,650until 7 NovEUR 2,940

Dates shown for the next few months. If nothing fits, tell us where and when — cohorts are added on demand, and private delivery can be scheduled any week.

More in Embedded Vision