Skip to content

media: apple: avd: update the VP9 host segmentation test - #3206

Merged
RyanTheTide merged 1 commit into
mainfrom
fix/avd-vp9-shared-map-host-test
Nov 29, 2026
Merged

RyanTheTide merged 1 commit into
mainfrom
fix/avd-vp9-shared-map-host-test

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

What: Restore the VP9 host test after the switch to a shared segmentation map in #2195. The fixture now checks the actual map addresses both picture banks emit and verifies that resizing preserves the map still in use.

Tested: Standalone VP9 host test at ea44d331266a passed with ASan and UBSan. Both regression controls failed their intended assertions. No runtime change.

Risk: Two-way door. Host test only, no Macs affected.

Not yet: Hosted CI and independent review.

Details

At a stable picture size the fixture checks both map operands on each bank while the first bank is still active. A size change must select and clear the spare map without touching the in-flight map. The reset remains pending until a frame writes a new map.

Evidence
  • Base 40e5e29cc915a421fb2676f895ff7dcc3f47a224 and head ea44d331266a02305cff2de7046779c81f75525b.
  • Run python3 drivers/media/platform/apple/avd/tests/vp9-test.py <output-dir> from the kernel tree.
  • The old fixture fails to compile on the same driver source. The repaired fixture passes with ASan and UBSan.
  • Routing the operands per bank and clearing the in-flight map each fail the intended assertion in separate host-only controls.
  • Checkpatch reported zero errors and zero warnings.

The VP9 host test still references fields removed when the segmentation
map changed from per-bank storage to shared per-stream storage. The test
fails to compile on current main.

Check both emitted map operands across picture banks. Verify that a size
change clears the spare map and leaves the in-flight map intact. Keep
checking that the reset remains pending until a frame updates the map.

Fixes: 7f02457 ("media: apple: avd: VP9: one segmentation map per stream, shared by the banks")
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide
RyanTheTide requested review from a team as code owners November 26, 2026 07:50

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at ea44d331266a once hosted CI is green (non-author review; GitHub records it as a comment because this account opened the PR)

Blockers: none. It changes only the host test, and nothing that gets built.

Checked:

  • The fixture now models the shared map from #2195. At a stable size, both banks emit the current seg_buf[seg_cur] address (assert_seg_map finds the encoded address exactly twice, once per map operand) while bank 0 is still busy.
  • A size change flips seg_cur, zeroes only the spare map and leaves the in-flight map's 0xa5 fill intact. That covers the #2136 resize interaction.
  • VP9_SEG_RESET stays owed through a keep-map frame and clears after the first map update. That matches the old test's semantics.
  • assert(... & AVD_QUIRK_LSR) pins the instruction format the address encoding assumes, so a fixture change fails loudly instead of matching nothing.

Non-blocking: the "exactly 2 matches" check would also count an unrelated program word that happens to equal addr >> 8. The fixture addresses make that impossible today, but checking the two known operand offsets would be tighter.

@github-actions github-actions Bot added area:media Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 26, 2026
@github-actions

github-actions Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Merge readiness at ea44d331: not ready yet

Check Detail
CI at head ok 18 checks passed
Review no needs one approving review from Core or Omarchy Mac (not the author)
Requested changes ok none
Hardware row at head ok not needed: no runtime change
Conflicts ok none
PR text ok Risk: two-way · . Host test only, no Macs affected.

Areas: area:media

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at the reviewed head. I ran the production-backed VP9 fixture with GCC and ASan/UBSan: both banks share the encoded address, resizing preserves the busy bank's old map, and the reset debt persists until an update. Hosted checks are green. A Clang GNU11 run hits the fixture's existing message-less static assertions under -Werror; this patch does not change them. No runtime source changes.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

code-owner ping @DjDeveloperr: closeout merge at ea44d331. App approved at this head. Host-test-only change (the VP9 host segmentation test). Hosted CI does not run vp9-test.py, so we ran it on main and on this head: PASS on both. No runtime change, so no row is needed. Merging under the 6-point rule 1 h from now unless you object.

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Merging under the 6-point rule (Ryan 09:29, permanent), at ea44d331. (1) The review App approved at this head. (2) Full CI is green. (3/4) Rows: host-test-only;vp9-test.py-PASS. (5) There's no blocking review. (6) Dj was pinged here 91 min ago with no objection. Revert: git revert -m 1 <merge>.

@RyanTheTide
RyanTheTide merged commit 7b7ac66 into main Nov 29, 2026
21 checks passed
@RyanTheTide
RyanTheTide deleted the fix/avd-vp9-shared-map-host-test branch November 29, 2026 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:media Area from CODEOWNERS (bot) door:two-way Revertible or not, from Merge risk (bot) needs-review No approving review from Core or Omarchy Mac yet (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant