Iteration 5 Phase 1 lock — A + G + B + E

Heavyweight four-track iteration:
- Track A: DEBUG instrumentation sweep (carried four iterations)
- Track G: PGO-disabled Firefox-fourier rebuild
- Track B: mpv libplacebo --vo=gpu segfault investigation
- Track E: multi-context libva safety (Sonnet review 9.6)

Natural sequence: A first (clean codebase), G in parallel on boltzmann
(~2h rebuild offloaded), E next (architectural on clean source), B last
(consumer-side investigation on post-A+E driver).

Phase 4 will subdivide into 4A/4G/4E/4B sub-phases. Phase 5 sonnet
review + Phase 7 verify span all four tracks.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-05 14:42:49 +00:00
parent f1aec7bdeb
commit e46b2ed2d6
+22 -24
View File
@@ -144,36 +144,34 @@ Likely needed for specific iter5 candidates:
- For D (DMABUF): `gbm_bo_create` test program + `VIDIOC_QBUF type=V4L2_MEMORY_DMABUF` exploratory.
- For G (PGO-disabled rebuild): edit firefox-fourier PKGBUILD to skip `--enable-profile-generate=cross`, `./mach build` incremental, redeploy via 600 MB tarball.
## In-scope (LOCKING DEFERRED — Phase 1 user input)
## In-scope (LOCKED 2026-05-05 for iteration 5) — A + G + B + E
To be locked at Phase 1 from candidates A..H above. Recommended pairings flagged per candidate.
Heavyweight four-track iteration. Natural execution sequence:
1. **Track A first (DEBUG sweep)** — clean the codebase before other changes ripple. Per-removal commits with smoke verification. Estimated ~30-60 min for the removal commits + smoke runs.
2. **Track G in parallel (PGO-disabled Firefox rebuild)** — kick off on boltzmann firefox-fourier container while local A work proceeds. ~2h rebuild + redeploy to ohm; mostly background time. Edit PKGBUILD to remove `--enable-profile-generate=cross`, `./mach build` from existing source tree (already extracted with iter3 patches).
3. **Track E (multi-context libva safety)** — architectural change after the codebase is clean from A. Move `LAST_OUTPUT_WIDTH/HEIGHT` from process-global static to per-driver-data (or per-context). Audit other process-global state. Verify via two simultaneous mpv processes on different fixtures.
4. **Track B last (mpv libplacebo `--vo=gpu` segfault)** — consumer-side investigation on the post-A post-E driver. Bisect mpv flags between `--vo=null` (works) and `--vo=gpu` (segfaults). May surface a Mesa/libplacebo upstream issue.
iter5 is large. Phase 4 will subdivide into 4A / 4G / 4E / 4B sub-phases. Phase 5 sonnet review + Phase 7 verify span all four tracks.
## Out-of-scope (LOCKED 2026-05-05 for iteration 5)
- Track A re-test (DONE in iter4 — 2130 frames clean is anchored evidence).
- Track F re-test (DONE in iter3 — sandbox patch verified end-to-end).
- New codecs OUTSIDE H.264 / MPEG-2 (VP8/VP9/AV1/HEVC out per iter1 lock).
- Bootlin/Mozilla upstream PR/MR/bug-file unless explicitly tasked at Phase 1 (candidate F is the gated option).
- Candidates C (perf binding cell), D (V4L2_MEMORY_DMABUF), F (upstreaming), H (new codec/hardware) — deferred to iter6+.
- Same standing OOS: bootlin/Mozilla upstreaming PR/MR/bug-file unless explicitly tasked, new codecs outside H.264/MPEG-2 scope, new platforms beyond ohm RK3568.
## Phase 1 success criterion (will lock after user picks candidate)
## Phase 1 success criterion (LOCKED 2026-05-05)
Pre-lock template:
- For candidate A: "Driver source builds clean with zero `request_log()` calls in non-error paths, all iter1+iter3+iter4 DEBUG commits removed (or explicitly justified-and-kept), vaapi-copy + mpv smoke tests still green at 2000+ frames clean."
- For candidate B: "`mpv --hwdec=vaapi --vo=gpu` decodes ≥30s of bbb_1080p30 without segfault — or root cause documented as Mesa/libplacebo upstream issue with operator-actionable workaround."
- For candidate C: "Anchored perf table for {mpv vaapi DMA-BUF, mpv vaapi-copy, Firefox-fourier HW (when G done), SW baseline} across drop count + CPU% + frame timing on bbb_1080p30; reproducible via documented script."
- For candidate D: "vaapi-copy + vaapi --vo=null still produce real frames with `V4L2_MEMORY_DMABUF`-backed CAPTURE buffers; race window mathematically eliminated."
- For candidate E: "Two concurrent libva contexts decode independently without cross-context state corruption (verifying via two simultaneous mpv processes on different fixtures)."
- For candidate F: "Mozilla Bugzilla bug filed with iter3 firefox-fourier patch; bootlin issue filed against libva-v4l2-request with iter1-iter4 patch series."
- For candidate G: "Firefox-fourier rebuilt without `--enable-profile-generate=cross`, deployed to ohm, plays bbb_1080p30 at sustained ≥24 fps with HW decode through firefox-fourier sandbox."
- For candidate H: per sub-target (MPEG-2 codec OR fresnel/ampere hardware).
**Track A:** Driver source builds clean with zero `request_log()` calls in non-error paths. iter1 patch-0010/0011/0014 DEBUG, iter3 Y2 v1, iter4 Y2 v3 / DPB census / per-control TRY iso all removed (or explicitly kept with justification). mpv stress test still 2000+ BeginPictures clean post-sweep.
**Track G:** Firefox-fourier rebuilt without `--enable-profile-generate=cross` (PGO-instrumented), redeployed to ohm. `firefox --version` reports `Mozilla Firefox 150.0.1`. Resulting libxul.so is materially smaller than the 3.6 GB instrumented build.
**Track E:** Two concurrent mpv processes on different bbb fixtures decode independently with no cross-context state corruption. `LAST_OUTPUT_WIDTH/HEIGHT` (and any other audited process-global) moved to per-driver-data or per-context.
**Track B:** `mpv --hwdec=vaapi --vo=gpu` plays bbb_1080p30 for ≥30s without segfault — OR root cause documented as Mesa/libplacebo upstream issue with operator-actionable workaround captured in iter5 close.
**Joint success:** all four tracks independently verifiable on the same iter5-end driver build. Phase 7 verifies each.
## Stop point
**Phase 1 lock requires user input** — pick from A..H (and any pairing). Recommended primary: **A + F** (DEBUG sweep + upstream prep). With Track A fixed, the fork is ready for upstream submission once the diagnostic noise is gone. F is gated on explicit operator instruction; if F is "no" this iteration, A alone is the natural close-the-instrumentation-loop iteration.
Alternative leans:
- **A + C** if perf measurement is a higher priority than upstream prep
- **B alone** if mpv libplacebo regression matters more than cleanup
- **G + B** if Firefox-side stress + libplacebo are the priority
After lock, iter5 phases 2..8 proceed autonomously per "Stop only if user is needed."
Phase 1 LOCKED. iter5 proceeds to Phase 2 (situation analysis covering all four tracks: instrumentation inventory, PKGBUILD PGO edit, libva-side process-global state audit, libplacebo segfault repro), Phase 3 (baseline anchor), Phase 4 (split into 4A/4G/4E/4B sub-phases per Track), Phase 5 (sonnet review of all four), Phase 6 (deploy + smoke), Phase 7 (verify each track), Phase 8 (close). Stop only if user input is needed.