marfrit 4353db0cd0 iter1 phase2: situation analysis + reset-context
Re-verifies Phase 0 substrate against live system (post-reboot ampere
2 min uptime, backend md5 still matches hand-build, source clips
intact, memory list unchanged). Two missing tools flagged for Phase 4
to install (strace, firefox-fourier).

Catalogues 7 constraints (backend file pacman-owned but content-
unmanaged; kernel hand-managed; HEVC OOPS cascade; mpv --hwdec=vaapi
needs GL surface; mpv MPEG-2 not on default hwdec allow-list; reboot
authorization in scope; fresnel offline-able and not depended-on)
and 7 known failure modes (HEVC oops, broken CI backend silent fail,
hwdec SW fallback, MPEG-2 hwdec gate, firefox prefs version
sensitivity, RK3399 vaDeriveImage zero-page issue as open Q for
RK3588, pacman-Qo lying about file content).

Explicit non-deps section (HEVC/VP9/AV1, kdirect-on-RK3588, cross-host
byte-compare, DokuWiki) preempts scope creep doubts in Phase 3-7.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-16 07:21:07 +00:00
2026-05-16 07:20:23 +00:00

ampere-fourier

TL;DR

Peer campaign to fresnel-fourier and libva-multiplanar, targeting ampere (CoolPi CM5 GenBook / Rockchip RK3588) — the third Rockchip generation the libva-v4l2-request-fourier backend gets exercised against (after ohm's RK3568 and fresnel's RK3399). Goal: make libva-v4l2-request-fourier deliver HW decode on RK3588 for every codec the SoC actually exposes via mainline V4L2 stateless.

Hardware target

Property Value
Board CoolPi CM5 GenBook (coolpi,pi-cm5-genbook / coolpi,pi-cm5 / rockchip,rk3588)
SoC Rockchip RK3588 (4× Cortex-A76 + 4× Cortex-A55, Mali-G610)
Decoder block 1 rkvdec (/dev/media0, /dev/video1) — H.264 + HEVC (mainline rockchip_vdec driver)
Decoder block 2 hantro-vpu as rockchip,rk3568-vpu-dec (/dev/media1, /dev/video2) — H.264 + MPEG-2 + VP8 (generic hantro mainline)
Decoder block 3 hantro-vpu as rockchip,rk3588-av1-vpu-dec (/dev/media3, /dev/video4) — AV1 dedicated decoder
Encoder block hantro-vpu as rockchip,rk3588-vepu121-enc (/dev/media2, /dev/video3) — out of scope
RGA rockchip-rga (/dev/video0) — 2D blit, out of scope
Kernel linux-ampere-fourier 7.0rc3.kafr1-1 (vanilla torvalds v7.0-rc3 + ampere DTS / board patches only; no fourier codec patches)
Boot stack extlinux entry arch_mainlineImage-7.0.0-rc3-ARCH+ + rk3588-coolpi-cm5-genbook.dtb-7.0.0-rc3-ARCH+

The decode surface is broader than fresnel's: three independent decoder cores (rkvdec + hantro-vpu + av1-vpu-dec) vs fresnel's two (rkvdec + hantro-vpu). The hantro-vpu binding here is a generic rockchip,rk3568-vpu-dec (not an RK3588-specific compatible) — kernel handles it via the rk3568 binding chain.

Mali-G610 (panfrost / panthor) is a different generation than fresnel's T860 and ohm's G52 — kwin / mesa / panfrost regressions or wins do not transfer.

Scope (LOCKED 2026-05-16 in phase0_findings.md)

In scope:

  • libva-v4l2-request-fourier backend exercised on ampere V4L2 decode nodes (rkvdec + hantro-vpu + av1-vpu-dec).
  • Codecs: everything the kernel V4L2 surface exposes — confirmed via v4l2-ctl --list-formats-out:
    • H.264 (S264) — rkvdec OR hantro
    • HEVC (S265) — rkvdec only
    • MPEG-2 (MG2S) — hantro only
    • VP8 (VP8F) — hantro only
    • AV1 (AV1F) — av1-vpu-dec only
  • Consumers: vainfo, ffmpeg -hwaccel vaapi, mpv --hwdec=v4l2request-copy, firefox-fourier (with vendor-default prefs from marfrit-packages#8).

Out of scope:

  • VP9 on RK3588 rkvdec — kernel does not expose V4L2_PIX_FMT_VP9_FRAME on this device in mainline v7.0-rc3. Enabling it is a kernel-agent experiment (separate campaign / issue), not part of the ampere baseline.
  • AV1 encoder, JPEG encoder, RGA — not decode work.
  • Codec-side patches to linux-ampere-fourier — per user policy (2026-05-16), ampere stays on a clean mainline + board-DTS kernel. Anything else gets routed through kernel-agent as an experiment (separate branch / target), not the baseline package.

Process

8(+1) phase loop per feedback_dev_process.md. Phase 0 substrate in phase0_findings.md. Phase 5 review uses the sonnet-architect subagent pattern (Plan with model: sonnet).

Predecessor data carryover: fresnel-fourier reached iter38 close with the same backend (libva-v4l2-request-fourier @ 7ac934e, "iter38b"). Per feedback_dev_process.md Phase 0 rules, fresnel's per-codec FPS / bit-exactness numbers carry as reference history only; ampere binding cells anchor to in-session measurements on RK3588 hardware.

Predecessor work this campaign builds on

  • ../fresnel-fourier/ — RK3399 peer campaign, closed iter38 at e66c5c0. Backend fork tip 7ac934e. The libva backend, mpv-fourier, ffmpeg-v4l2-request-fourier, firefox-fourier packages all consumed unmodified on ampere.
  • ../libva-multiplanar/libva-v4l2-request-fourier/ — the backend fork itself.
  • marfrit/kernel-agent — issue #6 filed 2026-05-15 (bootstrap-missing + asks). Bootstrap part landed via PRs #8/#9/#10 on 2026-05-16, producing linux-ampere-fourier 7.0rc3.kafr1-1. Asks #2 (VP9) and #3 (AV1 integration) reframed as experiments per user policy — separate kernel-agent issues to follow.
  • marfrit/marfrit-packages issue #17 — libva-v4l2-request-fourier CI build pkgrel=1 produces broken HEVC binary. ampere worked around by hand-rebuilding from source (md5 0c9a7efa…, 485 KB) over the packaged binary. Same workaround as fresnel until #17 is fixed.

Operator-facing repo URL

git.reauktion.de/marfrit/ampere-fourier — to be created during the first iteration if there's something publish-worthy. For now this repo lives only at ~/src/ampere-fourier on noether.

Non-upstreaming default

Inherited from libva-multiplanar / feedback_no_upstream.md. Patches must be aligned to upstream in syntax and semantics; PR / MR / bug-report only on explicit operator instruction. The exception is marfrit/kernel-agent experiments, which exist precisely to track candidate upstream patches in a controlled fleet-rollout pipeline.

Build infrastructure

ampere is itself a kernel-agent aarch64 build host (secondary, per kernel-agent README) — 8-core RK3588 + 32 GB RAM. For libva backend / mpv / ffmpeg builds the campaign uses ampere directly (small projects, hand-build is faster than packaging detour). For experimental kernel builds, kernel-agent dispatches to boltzmann (primary aarch64) or ampere (fallback).

S
Description
ampere (CoolPi CM5 GenBook / RK3588) campaign tracking HW video decode via libva-v4l2-request-fourier — peer to marfrit/fresnel-fourier and marfrit/libva-multiplanar.
Readme 76 KiB
Languages
Shell 100%