Skip to content

media: apple: avd: check the AV1 tile entries before using them - #1090

Merged
RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:max-avd-av1-tile-check
Nov 7, 2026
Merged

RyanTheTide merged 1 commit into
aurora-silicon:integration/aurorafrom
AxxzyWasTaken:max-avd-av1-tile-check

Conversation

@AxxzyWasTaken

Copy link
Copy Markdown
Contributor

The AV1 tile group control is user data. With fewer entries than the frame has tiles, avd-av1 read past the array. An entry past the coded data sent the engine to wild addresses: DART faults, a frame timeout, then recovery. This refuses such a request.

Chromium's VA path hit this on my M4 Max with 8 tiles and 1 entry. The VA driver's own bug is a separate fix.

Tested: on the J616C with Helium AV1 and ffmpeg, as part of the out-of-tree module. This version is compile-tested on integration/aurora. No KUnit test added.

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]>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Merge train 11-07: thanks. The check is right, but the production preamble now calls avd_av1_check_tiles(), vb2_get_plane_payload() and reads v4l2_ctrl.elems, which the AV1 host fixtures (tools/asahi/avd-av1-tail-tests.py, drivers/media/platform/apple/avd/tests/av1-test.py) didn't model, so host-tests failed here. #1100 carries your commit unchanged plus the fixture fix (and reads the payload only when the frame has tiles). It merges after an AV1 bit-exact run on our Neo, and this PR closes with it.

@RyanTheTide
RyanTheTide merged commit 00a90e1 into aurora-silicon:integration/aurora Nov 7, 2026
1 check failed
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