Epic: #113 · Milestone: MC4 — Display & 2D
Why
The mailbox framebuffer is single-plane, no vsync signalling, and its scaling is opaque. The ADR (#47) needs: a UI plane at 1080p, a video plane at native size, hardware scaling, and a vertical-blank interrupt. That is the HVS (display lists in HVS memory, per-plane scaling/format) + the HDMI block (mode timing, PHY, infoframes, audio later in #79, CEC in #98). In-tree material: rpi/videocore7.home (1,416) and rpi/rp1_hdmi.home (1,200) — note the HDMI blocks on the Pi 5 are in the SoC, not RP1; the file name is wrong and the register maps are unverified.
Risks
No public datasheet for BCM2712 HVS/HDMI; knowledge comes from the DTB, the firmware's leftover state at boot (dump and study it), and public driver documentation. Plan an exploration spike (dump HVS display list + HDMI regs after the mailbox FB is up, on serial) before writing the driver.
Tasks
- Spike:
hvsdumpshell command printing the firmware-programmed display list and HDMI state; document register findings indocs/hardware/BCM2712_DISPLAY.md. - HVS: allocate display lists, plane descriptors (ARGB8888 UI, NV12/YUV420 video, optional ARGB OSD), scaling kernels, z-order, alpha; double-buffered list swap at end-of-frame IRQ.
- HDMI: EDID read over DDC (I2C in the HDMI block), preferred mode selection with a 1080p60 fallback, PHY config per mode, AVI infoframe (RGB/YCbCr, colorimetry), hotplug interrupt → re-probe.
- Vsync-driven page flip API for the compositor; frame counter and missed-flip counter exported for #101.
- 4K: 2160p60 timing + UI plane scaled 1080p→2160p; verify bandwidth/perf at the plug.
- Stretch: HDR10 static metadata infoframe passthrough for HEVC HDR content.
- Rename/relocate
rp1_hdmi.home,videocore7.homeper #62.
Acceptance
Rig capture shows a moving test pattern at 60 fps with zero tearing (capture two consecutive frames and check the flip counter), on 1080p and 4K panels; EDID-derived mode logged; hot-unplug/replug recovers.
Size: XL · Depends on: #73, #47 · Blocks: #84 (zero-copy plane), #79, #98