Skip to content

media: apple: add ProRes decode-v0 node - #1259

Closed
RyanTheTide wants to merge 1 commit into
integration/aurorafrom
media/prores-decode
Closed

RyanTheTide wants to merge 1 commit into
integration/aurorafrom
media/prores-decode

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add a second, stateful V4L2 ProRes decoder node on the T8140 and T6000
    compatibles while leaving the encoder queues and controls unchanged
  • validate complete non-RAW ProRes frames and pack the 0x100-byte decode-v0
    descriptor with linear NV16, NV24, P216, and P416 capture layouts
  • account for interleaved 0x100-byte decode and 0x180-byte encode entries on
    the shared APR ring, including generation-bit wrap and split ring copies
  • snapshot status/detail registers before W1C and tail readback, retain the
    existing reset-before-release timeout rule, and mark cancelled jobs without
    inventing a hardware cancellation opcode
  • add KUnit coverage for descriptor packing, parser bounds, all six non-RAW
    profile families, and variable-size ring accounting

Tests

  • arm64 LLVM W=1 targeted build: passed
  • arm64 QEMU KUnit: Testing complete. Ran 15 tests: passed: 15
  • strict checkpatch: 0 errors, 0 warnings, 0 checks

Current limitation

The parser validates progressive and two-picture interlaced frames, but the
submission path currently returns EOPNOTSUPP for the latter. The clean
decode-v0 contract establishes host repacking and one-picture submissions but
does not establish the second field's descriptor geometry. This draft does
not guess a field index or output offset that could corrupt a capture surface.

Guarded hardware qualification plan

No target hardware was used for this change.

On Neo/T8140, first run a generated progressive apcn frame into P216 with
the validated frame end at an IOMMU guard page, 64-byte rows, 128-byte plane
placement, poisoned padding, and guards after both output regions. Require a
DONE-only IRQ, a tail advance of 0x100, no DART fault, and a visible-sample
comparison against a software decode. Repeat with an alpha-bearing ap4h
frame into color-only P416 to prove 4:4:4 layout and alpha discard. Capture
all status/detail words and test real reset recovery before enabling wider
qualification.

On M1 Pro/T6000, repeat the same apcn and ap4h comparisons while checking
the a0 initialization/statistics registers and the T6000 DVA window. Keep the
macOS volume and xART ledger read-only. Interlaced qualification starts only
after a clean contract addition defines field-index geometry; it will use two
bounded one-picture submissions and compare both field parities.

Assisted-by: LLM (Claude:Opus 5.5)

Add a compatible-gated stateful decoder alongside the existing encoder.

Validate complete ProRes frames and pack the 0x100-byte non-RAW descriptor.

Share the APR ring with generation-aware variable-size accounting.

Snapshot completion diagnostics before the W1C/tail handoff.

Preserve reset-based timeout recovery.

Cover descriptor layout, parser bounds, and mixed ring wrap with KUnit.

Signed-off-by: Ryan Murray <81541646+RyanTheTide@users.noreply.github.com>
Assisted-by: LLM
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Blockers: 1.

  1. media: apple: prores: hardware ProRes decode on every APR engine, several jobs in the ring #2620 has replaced this. media: apple: prores: hardware ProRes decode on every APR engine, several jobs in the ring #2620 is the non-draft stack (media: apple: prores: hardware ProRes decode on every APR engine #2396, media: apple: prores: parse each decoder source frame once #2462 and media: apple: prores: keep several decode jobs in the ring, retire them on the engine's finished-job id #2491, merged up to the current integration/aurora). It adds the ProRes decoder node on every APR engine, input bounds and DYN_RESOLUTION, parses each frame once, and keeps several decode jobs in the ring, retired on the engine's finished-job id. It merges cleanly. This PR covers the same ground in an earlier form: only the T8140 and T6000 compatibles get the node, a single-job decode-v0, and interlaced returns EOPNOTSUPP. It conflicts with the base, has not run on any Mac ("No target hardware was used"), and its commit carries an Assisted-by: LLM trailer. I recommend closing it in favour of media: apple: prores: hardware ProRes decode on every APR engine, several jobs in the ring #2620.

If any piece is not in #2620 and is still wanted, carry it there as its own commit with a hardware row, rather than rebasing this branch. Candidates are the 0x100/0x180 mixed-entry ring accounting test, and snapshotting status/detail before the W1C.

HW row: none for this PR (close). For #2620: Neo J700 and M1 Pro progressive apcn and ap4h decode against a software decode, with a mixed encode and decode ring wrap, 0 DART faults, and 0 AVC / 0 failed units / no new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #2620, which brings hardware ProRes decode to every APR engine with hardware rows.

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