de0f267d05
Locks the research question, captures hardware + kernel + userland state, walks the V4L2 decoder topology (3 decoder cores), enumerates libva backend behavior, anchors the in-session N=1 baseline (H.264 via rkvdec, VP8 + MPEG-2 via hantro — all decode end-to-end), and documents the three blockers (kernel HEVC OOPS in rkvdec_hevc_prepare_hw_st_rps; kernel VP9 not exposed on RK3588 rkvdec; libva backend iter38 hard-capped at 2 fds, AV1 unprobed). Predecessor carryover rules followed: backend source pin + memory entries carry; per-codec FPS numbers and bit-exact criteria do not. Open questions tabled for Phase 1 goal lock: 1. Success-metric scope: 3 / 5 / 6 codecs. 2. RK3588 bit-exact anchor (kdirect adapt vs SW byte-compare). 3. HEVC OOPS pre-decode vs post-decode (instrumentation Q). 4. firefox-fourier vendor defaults adequacy on RK3588. 5. AV1 source clip provenance for the eventual iter39 test. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
68 lines
5.8 KiB
Markdown
68 lines
5.8 KiB
Markdown
# ampere-fourier
|
||
|
||
## TL;DR
|
||
|
||
Peer campaign to [`fresnel-fourier`](../fresnel-fourier/) and [`libva-multiplanar`](../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_mainline` → `Image-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`](../../.claude/projects/-home-mfritsche-src/memory/feedback_dev_process.md). Phase 0 substrate in [`phase0_findings.md`](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/`](../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/`](../libva-multiplanar/libva-v4l2-request-fourier/)** — the backend fork itself.
|
||
- **[`marfrit/kernel-agent`](https://git.reauktion.de/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](https://git.reauktion.de/marfrit/marfrit-packages/issues/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).
|