Skip to content

media: apple: avd: check the AV1 tile entries before using them (carries the M4 Max fix with host-test fixtures) - #1100

Merged
RyanTheTide merged 2 commits into
integration/aurorafrom
merge-train/av1-tile-check-20261107
Nov 7, 2026
Merged

RyanTheTide merged 2 commits into
integration/aurorafrom
merge-train/av1-tile-check-20261107

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Carries #1090 (AxxzyWasTaken, M4 Max, his commit 00a90e1 unchanged, authorship and Signed-off-by kept) plus one follow-up, so it can go through the merge train:

  • His commit refuses an AV1 request whose tile-group control has fewer entries than the frame has tiles, or an entry that points past the OUTPUT payload. Chromium's VA path sent 8 tiles with 1 entry on his J616C and the engine walked off into DART faults and a timeout.
  • The follow-up reads the payload size only when the frame has tiles to check, and fixes the AV1 host-test fixtures. The production preamble now calls avd_av1_check_tiles(), vb2_get_plane_payload() and reads v4l2_ctrl.elems, which broke avd-av1-tail-tests and avd-codec-tail-tests on the original PR's CI. run-host-tests --only avd is 12/12 on this head.

Hardware: astaff's J616C (Helium AV1 and ffmpeg, out-of-tree module form). On our fleet the Neo (AV1-capable) boots a test kernel carrying the check and decodes the AV1 sample set bit-exact against software before this merges.

🤖 Generated with Claude Code

AxxzyWasTaken and others added 2 commits November 7, 2026 11:19
The tile group control is user data. A request with fewer entries than
the frame has tiles made avd-av1 read past the array, and an entry past
the coded data sent the engine to wild addresses: DART faults, a frame
timeout, then recovery. Chromium's VA path hit this with 8 tiles and 1
entry on an M4 Max. Refuse such a request.

Signed-off-by: AxxzyWasTaken <[email protected]>
…ix the host fixtures

Follow-up to "check the AV1 tile entries before using them":

- Read the OUTPUT payload size only when the frame has tiles to check,
  so the check never looks at the source buffer for a frame without any.
- The host tests extract the production preamble, which now calls
  avd_av1_check_tiles(), vb2_get_plane_payload() and reads
  v4l2_ctrl.elems. Extract the helper in avd-av1-tail-tests, and give
  both AV1 fixtures the payload accessor, the elems field (one entry for
  the single test tile) and a no-op ratelimited log.

run-host-tests --only avd: 12/12 pass (CI failed avd-av1-tail-tests and
avd-codec-tail-tests on the tile check alone).

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
@RyanTheTide
RyanTheTide merged commit cdf2a5f into integration/aurora Nov 7, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the merge-train/av1-tile-check-20261107 branch November 7, 2026 13:34
RyanTheTide added a commit that referenced this pull request Nov 7, 2026
Brings aurora-wip up to fleet25: DT descriptions (#1029, #1030, #1112),
the J715 board (#1129), Stockholm NFC (#1042, #1136), the AV1 tile check
(#1100), the M4 Max ANE profile and AVD quirk (#1088, #1091), boot-log
fixes (#1103, #1104) and the Neo ANE memory floor (#1137).

Conflicts: macaudio.c and apple,macaudio.yaml, where aurora-wip's J813
and J873 entries and integration's J715 entries were added at the same
spot. Keep all of them.

Signed-off-by: Ryan Murray <[email protected]>
Assisted-by: LLM
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.

2 participants