iter5 Phase 0 amend: Bug 3 collapses, locked criteria 5→4
Phase 2 source-read mid-execution found that v4l2_ctrl_mpeg2_* and v4l2_ctrl_vp8_frame are byte-identical v6.12 ↔ v7.0 mainline. On-fresnel re-trace with correct hantro-decoder bind shows MPEG-2 controls submit at = 0; the "Unable to set control(s)" log noise is the backend's H.264/HEVC init-probe EINVAL on a non-H.264 device (B4 backlog), not a UAPI drift. iter5 locked scope is now vb2_dma_resv (4 patches: 3 existing operator-authored RFC v2 + new rkvdec consumer). Criteria reduced from 5 to 4. B4 stays in backlog. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+23
-14
@@ -110,39 +110,48 @@ A and C could plausibly be one iteration if scope cooperates; B is a separate be
|
||||
|
||||
## Locked research question (iteration 5, 2026-05-10)
|
||||
|
||||
User pick: **Candidate B — both Bug 2 + Bug 3 in one close, kernel-agent local-carry acceptable.**
|
||||
User pick: **Candidate B — Bug 2 only, with rkvdec consumer added. Kernel-agent local-carry acceptable.**
|
||||
|
||||
> **"Land vb2_dma_resv (Bug 2) AND fix hantro UAPI drift (Bug 3) in the `linux-fresnel-fourier` kernel product so that every shipping codec on RK3399 — H.264, HEVC, VP9 via rkvdec; MPEG-2, VP8 via hantro-vpu-dec — produces directly-readable pixels through the libva backend's cap_pool path, on the next kernel product shipped from kernel-agent. The transitive-proof discipline becomes optional belt-and-suspenders, not the only viable verifier."**
|
||||
**Phase 2 source-read finding (2026-05-10 mid-Phase): Bug 3 does not exist as a UAPI drift.** Empirical struct-by-struct diff of `include/uapi/linux/v4l2-controls.h` between v6.12 (the RFC v2 base) and v7.0 (the kernel-agent product baseline for `linux-fresnel-fourier 7.0-1`) shows `v4l2_ctrl_mpeg2_{sequence,picture,quantisation}` and `v4l2_ctrl_vp8_frame` byte-identical across both kernels. On-fresnel re-trace of MPEG-2 decode with the correct hantro-decoder bind (`/dev/video2 + /dev/media0` on the 2026-05-10 boot) shows the actual MPEG-2 control submissions (`0xa409dc/dd/de`) returning `= 0` (success), with five successful frame decodes. The "Unable to set control(s): Invalid argument" log noise on hantro was traced to the backend's init-time H.264 + HEVC decode_mode/start_code probes (`0xa40900/01 + 0xa40a95/96`) — these EINVAL on hantro because hantro is MPEG-2/VP8 only, but have no functional impact on the MPEG-2/VP8 decode that follows. This is the **B4 backlog item** ("context.c log suppression for unsupported codec controls"), present on every device that doesn't support the full codec set, not a kernel bug. Bug 3 collapses to "B4 cosmetic noise on hantro, dropped from iter5 scope."
|
||||
|
||||
> **"Land the vb2_dma_resv RFC v2 patch series (3 existing patches: videobuf2 helper + hantro consumer + rockchip-rga consumer) PLUS a new fourth rkvdec consumer patch in the `linux-fresnel-fourier` kernel product, so that every shipping codec on RK3399 — H.264, HEVC, VP9 via rkvdec; MPEG-2, VP8 via hantro-vpu-dec — produces directly-readable pixels through the libva backend's cap_pool path on the next kernel product shipped from kernel-agent. The transitive-proof discipline becomes optional belt-and-suspenders, not the only viable verifier."**
|
||||
|
||||
### Pass/fail (boolean, per `feedback_dev_process.md` Phase 1)
|
||||
|
||||
1. **Bug 2 closed — cap_pool readback returns kernel-decoded pixels on the new kernel.** For all 3 rkvdec codecs (H.264 1080p30, HEVC 720p, VP9 720p), `ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vf hwdownload,format=nv12,format=yuv420p -f rawvideo` via the libva backend on the new kernel returns raw YUV byte-identical to the SW reference (or transitive equivalent that explicitly demonstrates cap_pool is delivering kernel-written pages, not init pattern). The `RGB(0,0x4c,0)` constant-fill signature is gone.
|
||||
**Amended 2026-05-10 post-Phase-2 source-read.** Dropped from 5 criteria to 4 after the empirical Bug-3 collapse documented above. MPEG-2 + VP8 fold into the Bug-2-closes block — the hantro cap_pool readback is the only blocker for them, identical in shape to the rkvdec block. The B4 cosmetic init-probe noise on hantro is out of iter5 scope (backlog).
|
||||
|
||||
2. **Bug 3 closed — hantro MPEG-2 + VP8 controls accepted on the new kernel.** `ffmpeg -hwaccel vaapi ... bbb_720p10s_{mpeg2.ts,vp8.webm}` via the libva backend on the new kernel runs without kernel `Unable to set control(s)` log messages, and produces YUV byte-matching the SW reference (with or without transitive proof depending on Bug 2 status for the hantro path specifically).
|
||||
1. **Bug 2 closed — cap_pool readback returns kernel-decoded pixels on the new kernel, for both decoder blocks.** For all 5 shipping codecs (H.264 1080p30 + HEVC 720p + VP9 720p via rkvdec; MPEG-2 720p + VP8 720p via hantro), `ffmpeg -hwaccel vaapi -hwaccel_output_format vaapi -vf hwdownload,format=nv12,format=yuv420p -f rawvideo` via the libva backend on the new kernel returns raw YUV byte-identical to the SW reference. The `RGB(0,0x4c,0)` constant-fill signature is gone campaign-wide.
|
||||
|
||||
3. **Substrate ships from `kernel-agent`.** The new kernel is built and promoted via the kernel-agent pipeline (per memory `project_kernel_agent.md` — `ka-promote` + `ka-close --status success` semantics) and tagged `linux-fresnel-fourier 7.0-2` (or whatever version the agent produces next). Local-carry patches in the kernel-agent product are acceptable for iter5 close — mainline-landing is bonus, not required. Patch scope-tagged per agent discipline (Hard rule #7).
|
||||
2. **Substrate ships from `kernel-agent`.** The new kernel is built and promoted via the kernel-agent pipeline (per memory `project_kernel_agent.md` — `ka-promote` + `ka-close --status success` semantics, OR the manual build path if `ka-*` CLI isn't operational yet) and tagged `linux-fresnel-fourier 7.0.kafr2` per the fleet manifest's versioning scheme. Local-carry patches in the kernel-agent product are acceptable for iter5 close — mainline-landing is bonus, not required. Patches are scope-tagged per agent discipline (Hard rule #7): vb2 helper under `subsystem/media/videobuf2/`, three consumer opt-ins under `subsystem/media/<consumer>/`.
|
||||
|
||||
4. **No regression on already-shipping codec contracts.** The Phase 3 anchor payloads (FRAME + COMPRESSED_HDR + slice for all 5 codecs) on the new kernel still byte-match the iter1-4 captures, modulo the documented S4 uv_mode VP9 carve-out. The libva backend tip `692eaa0` is unmodified; only the kernel substrate changes.
|
||||
3. **No regression on already-shipping codec contracts.** The Phase 3 anchor payloads (FRAME + COMPRESSED_HDR + slice for all 5 codecs) on the new kernel still byte-match the iter1-4 captures, modulo the documented S4 uv_mode VP9 carve-out. The libva backend tip `692eaa0` is unmodified; only the kernel substrate changes. The B4 init-probe EINVAL noise is unchanged (not in scope) but does not cause functional regression.
|
||||
|
||||
5. **Five-codec direct-verification block.** With the new kernel + unmodified backend tip `692eaa0`, all 5 codecs pass criterion-4 *directly* (not transitively). VP9 in particular: byte-identical YUV from libva-backend hwdownload to SW reference. The campaign scoreboard becomes "5/5 direct" (was "4 direct + 1 transitive").
|
||||
4. **Five-codec direct-verification block.** With the new kernel + unmodified backend tip `692eaa0`, all 5 codecs pass criterion-4 *directly* (not transitively). VP9 in particular: byte-identical YUV from libva-backend hwdownload to SW reference. MPEG-2 + VP8 pass directly through hantro hwdownload (previously transitive-only since iter3). The campaign scoreboard becomes "5/5 direct" (was "4 direct + 1 transitive" at iter4 close).
|
||||
|
||||
A clean iter5 close has all five criteria green. Phase 7 → Phase 4 loopback per `feedback_dev_process.md` if any fail.
|
||||
A clean iter5 close has all four criteria green. Phase 7 → Phase 4 loopback per `feedback_dev_process.md` if any fail.
|
||||
|
||||
### Scope locks
|
||||
|
||||
**In scope:**
|
||||
|
||||
- vb2_dma_resv kernel patch (RFC v2 carry, or local equivalent). Source: linux-media list RFC v2 thread (resume from `reference_dmabuf_resv_blocker.md`).
|
||||
- Hantro UAPI drift root-cause + fix. Probably struct-size / field-additions in `drivers/media/platform/verisilicon/hantro_*.c` between 6.19 → 7.0. Phase 3 baseline diffs the headers in both kernels.
|
||||
- Kernel-agent product build + promote pipeline (per `project_kernel_agent.md`). Iter5 is the first user-driven exercise of `ka-promote` + `ka-close` for the fresnel-fourier campaign tag.
|
||||
- Re-verification matrix on new kernel: all 5 codecs through libva, direct pixel hash.
|
||||
- vb2_dma_resv RFC v2 patch series — 3 existing patches authored by operator (Markus Fritsche) on `~/src/linux-rfc/`:
|
||||
- `fbe8bf57a media: videobuf2: add dma_resv release-fence helper` — opt-in API `vb2_buffer_attach_release_fence()` + per-queue fence context.
|
||||
- `14a68fcf0 media: hantro: attach dma_resv release fence at buf_queue` — one-line consumer opt-in.
|
||||
- `89b699508 media: rockchip-rga: attach dma_resv release fence at buf_queue` — one-line consumer opt-in.
|
||||
- **New rkvdec consumer patch (iter5 contribution)** — same one-line pattern, target `drivers/media/platform/rockchip/rkvdec/rkvdec.c::rkvdec_buf_queue` (line ~959 at v7.0, post-staging-promotion path). Closes Bug 2 for rkvdec (H.264 + HEVC + VP9 paths).
|
||||
- Rebase of the 4-patch series from v6.12 base → v7.0 base (`linux-fresnel-fourier 7.0-1` substrate). hantro_v4l2.c + rga-buf.c unchanged 6.12→7.0 → patches should apply mostly clean. videobuf2-core.c needs Phase 2 fine-grained re-check.
|
||||
- Kernel-agent fleet manifest update (`fleet/fresnel.yaml`): add the 4-patch group under `includes:`, remove from `Explicitly NOT included` comment block, bump version to `7.0.kafr2`.
|
||||
- Kernel-agent product build + install on fresnel via boltzmann build-host. `ka-*` CLI verbs aren't implemented yet (per memory `project_kernel_agent.md`) — fallback to the manual build path until they land.
|
||||
- Re-verification matrix on new kernel: all 5 codecs through libva, direct pixel hash, no transitive proof needed for any of them.
|
||||
|
||||
**Out of scope:**
|
||||
|
||||
- **Bug 3 as originally framed — dropped, doesn't exist as UAPI drift** (see Phase 2 source-read finding at top of locked-question block).
|
||||
- B4 "context.c log suppression for unsupported codec controls" — the H.264/HEVC init-probe EINVAL noise on hantro. Backlog, separate iteration.
|
||||
- iter4-B1 (auto-detect device discrimination) — backend-side fragility, separate iteration.
|
||||
- iter4-B2 (mpv-vaapi create-device failure) — consumer-side.
|
||||
- iter4-Q6, COLOR_RANGE, B3/B4/B5/B6/L3 backlog — backend, not kernel.
|
||||
- panfrost IOMMU_CACHE — sibling issue not on Bug-2/Bug-3 critical path.
|
||||
- iter4-Q6, COLOR_RANGE, B3/B5/B6/L3 backlog — backend, not kernel.
|
||||
- panfrost IOMMU_CACHE — sibling issue not on Bug-2 critical path. Fleet manifest comment "ship together with vb2_dma_resv" is informational, but iter5 ships vb2_dma_resv standalone unless panfrost work surfaces unexpectedly.
|
||||
- Performance metrics — that's Candidate D, deferred again.
|
||||
- Front-end libva (campaign-wide, unchanged).
|
||||
- AV1 (no decoder block).
|
||||
|
||||
Reference in New Issue
Block a user