Skip to content

media: apple: avd: enable queued multi-VP decoding on aurora-wip - #787

Merged
RyanTheTide merged 2 commits into
aurora-wipfrom
avd/multi-vp-wip
Nov 1, 2026
Merged

RyanTheTide merged 2 commits into
aurora-wipfrom
avd/multi-vp-wip

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Queued H.264 and HEVC decode currently uses one VP per codec, leaving available decoder engines idle. Dispatch queued pictures across firmware-advertised AVM2 codec pools and allocate private scratch banks for each in-flight picture, including the bank retained by ordered PP. Preserve tagged per-engine VP DONE, old-firmware fallback, VP9 dependency barriers and AV1's single-picture path.

Rebased the two mvp3 commits onto aurora-wip 7f7035c, which includes #785 and #786. The program-test.py conflict keeps both the #785 sparse-DPB/reference-free I cases and the multi-VP dispatch, reverse VP completion, in-order PP and HEVC bank-lifetime cases. The #785 H.264 HOLD, rejected-slice ownership and final job_finish_detach paths are retained; the H.264 production change only expands bank storage and selects the firmware-sized bank count.

Previously qualified hardware results, in decoded frames per second (one engine to multi-VP): J616s H.264 1080p 1094 to 1902, HEVC 1080p 2135 to 2590, H.264 4K 414 to 481; VP9 and AV1 unchanged. All compared outputs were bit-exact, with zero DART/AVD kernel log lines. M2 H.264 1080p 748 to 1695, H.264 4K 319 to 446, HEVC 1080p 1521 to 1935. These measurements are from the qualified mvp3 pair; the combined aurora-wip module still needs lane 4's hardware check before merging.

Tested: tools/asahi/run-host-tests.py 158/158; queue host, program, dispatch, recovery and VP9 tests; routed Unicorn queue, in-flight and multi-VP tests on v3-t0/v3-t1/v5-t0/v5-t2; Unicorn VP9; all-image firmware transport tests. The program tests retain 1600 identical complete legacy programs, 64 sparse programs changing only reference slots, 32 reference-free non-IDR I programs matching legacy IDR, and all 65536 DPB maps. Multi-VP replay checks five banks across four VPs, reverse VP DONE, PP retirement order and retained DMA ownership. An external apple-avd.ko build against 7.3.0-aurora-fleet14f passes W=1 with zero warnings and is signed with the matching kernel key; its PKCS#7 signature verifies.

Firmware companion: aurora-silicon/avd-fw#6. Keep both PRs open until lane 4 checks H.264 conformance remains 68/135 with the combined module and verifies the throughput gains.

🤖 Generated with Claude Code

Port multi-VP selection onto the current queued transport without losing
its SRAM word stores, IRQ/mailbox fixes, saved frame FIFO or tagged VP DONE.
Negotiate an optional AVM2 codec pool record and rotate submissions through
its VP masks. Old firmware retains the k4m selector and two picture banks.

Size H.264 and HEVC banks for the advertised VPs plus ordered PP ownership,
limited by the available FIFOs. Their VP work uses private slice state;
firmware still starts PP in submission order. Keep VP9 probability producer
barriers and AV1's single-picture path intact.

Exercise negotiation, fallback, rotation/retry, production picture banks
and routed single-stream programs, including reverse VP completion order.
Document the inferred T6040 pool and the remaining silicon qualification.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
The production picture-bank query accepts a const device. Match that
signature in the host boundary so its HEVC bank lifetime checks compile
with warnings treated as errors.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Tested on hardware before merge.

  • J616s, fleet14d with the PMC floor (same two commits as mvp3): H.264 1080p 1902 fps (one engine: 1094), HEVC 1080p 2590 (2135), H.264 4K 481 (414). VP9 and AV1 unchanged. Bit-exact, no DART or AVD kernel lines.
  • M2, a fleet14f candidate kernel built from aurora-wip 9d04a22 with this branch merged (tree ac22b83b), avd-fw 6756ca99: Fluster JVT-AVC_V1 68, HEVC 140/147, VP9 216/305. That's identical per vector to media: apple: avd: H.264 slice hold and intra-header fixes on the rewrite #785 alone, with no new failures. H.264 1080p Q16 1728 fps (748 without multi-VP), N=4 1754, HEVC 1080p 1934 (1521), all bit-exact. One-shot boot d07b5fa4: kernel -p3 0.

🤖 Generated with Claude Code

@RyanTheTide
RyanTheTide merged commit b359258 into aurora-wip Nov 1, 2026
notmysegv pushed a commit to notmysegv/linux that referenced this pull request Nov 4, 2026
…tion/aurora

Bring integration/aurora up to aurora-wip b359258, the source of
7.3.0-aurora-fleet14f, promoted on the M1 Pro, M2, Neo and J616s on
2026-11-01 and 11-02. The range also covers the fleet14c, fleet14d and
fleet14e sources (f41ac3d, 4759557, 757fc07), each booted on
hardware. It adds aurora-silicon#773, aurora-silicon#776, aurora-silicon#777, aurora-silicon#737, aurora-silicon#713, aurora-silicon#785, aurora-silicon#786, aurora-silicon#788,
aurora-silicon#789 and aurora-silicon#787. No conflicts.

Assisted-by: LLM
Signed-off-by: Ryan Murray <[email protected]>
@RyanTheTide
RyanTheTide deleted the avd/multi-vp-wip branch November 7, 2026 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant