60fps HDMI pipeline: zero-copy VPU encode + RGA hardware CSC + kmssink double-vsync fix#29
Open
NickEngmann wants to merge 5 commits into
Open
60fps HDMI pipeline: zero-copy VPU encode + RGA hardware CSC + kmssink double-vsync fix#29NickEngmann wants to merge 5 commits into
NickEngmann wants to merge 5 commits into
Conversation
added 5 commits
July 2, 2026 18:23
…y buffer release)
…o-copy display path); document 4K resilience validation (EXT_DMA 66.7fps aggregate, decode 120fps, videobalance 4K ceiling 56fps, COLOR_RANGE lead)
…y blocks until vblank, kmssink's own vsync wait made every frame take 2 vblanks (display pinned at 30fps on 60Hz mode); verified 30.00 -> 59.99 fps live at 4K60
…s categories when tree exceeds MINUS_SCREENSHOTS_MAX_GB (10) or free disk drops below MINUS_SCREENSHOTS_MIN_FREE_GB (4); unlimited-count training collection was filling the 59GB root (~1.5GB/day, 13GB accumulated, 84% full)
…onomousMode: escalate Roku-home OCR fallback past the audio veto after 6 consecutive vetoed matches — home promo audio held a stuck-on-home loop for 50 min when the digits-only regex silenced the ECP recovery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The HDMI passthrough pipeline capped at 27-30fps at every resolution (dipping to 23 during shows) despite the VPU being rated for 4K60, making media playback visibly janky.
Root causes and fixes
Four stacked bottlenecks, found and fixed in order:
Encoder side (companion branch:
garagehq/ustreamer→fix/fps-early-buffer-release, commit 32ab470)captured_fpsdropped 60→30 the moment a client attached. Buffers are now released inside the worker right after encode.imcvtcolor. Any hardware-path failure falls back to the legacy CPU path permanently with one log line. Pixel-modifying features (blocking composite, notification overlay) still route through the CPU path while active — all overlays verified working.Display side (this branch)
videobalanceomitted when color settings are neutral — CPU per-pixel color correction caps 4K at ~56fps and breaks the DMABuf zero-copy path into kmssink. The pipeline now rebuilds with/without the element when settings cross neutral.drmModeSetPlaneioctl blocks until the flip latches at vblank (16.67ms/call), and kmssink then waits for a second vblank internally → 2 vblanks/frame. Fixed withskip-vsync=true(upstream property intended exactly for this); frame pacing remains vsync-locked by the blocking SetPlane, so no tearing.Results (measured live)
4K resilience validated with real 4K NV12 content in CMA dma-heap buffers (same memory class as V4L2 capture buffers); display decode benchmarks 120fps at 4K.
Preserved features (verified live)
Blocking overlay (header/vocab/preview/stats/OCR snippet), notification overlay,
/snapshot+/snapshot/raw, OCR + VLM detection, autonomous mode — all confirmed working; stream returns to 60fps after a block ends.Follow-up documented in CLAUDE.md
Color settings are currently neutral (fastest path). The VOP2 plane interprets the video as BT.601/Limited matching the data the RGA path preserves, so neutral should look correct; the old sat=1.4/bri=0.2 likely compensated for the pre-RGA CPU conversion. A
COLOR_RANGElead is documented if color needs revisiting.🤖 Generated with Claude Code