Skip to content

media: apple: ave: test the firmware size refusal path - #2963

Merged
RyanTheTide merged 1 commit into
integration/aurorafrom
m2-merge/ave-size-refusal
Nov 23, 2026
Merged

RyanTheTide merged 1 commit into
integration/aurorafrom
m2-merge/ave-size-refusal

Conversation

@RyanTheTide

Copy link
Copy Markdown
Contributor

Problem

The AVE probe and firmware selector each checked segment sizes. The M2 test covered fallback selection without checking that the probe rejects near misses.

Change

Reuse the size predicate in the probe, assert that it accepts both measured M2 layouts and rejects near misses, and report the observed segment sizes when it refuses a build.

Testing

Host AVE ABI, recovery, input and IPC tests pass at 4b35702880a6145297b498397b42a563d6f1d8d2. Checkpatch reported zero errors, warnings or checks.

Earlier hardware and KUnit evidence

This carries the same AVE refusal predicate, test cases and probe diagnostic as the earlier revision. The diff preserves the encoder start configuration from the base and drops the duplicate size-predicate comment.

  • J473, fleet82 on the default command line, with the earlier module: 12/12 encodes passed and each stream matched its repeat. H.264 and HEVC decoded 120/120 frames per stream.
  • J413, firmware 13.5, with the earlier module: 12/12 encodes passed and all six streams matched production. Four before/after-s2idle streams matched.
  • J615, firmware 27.2, with the earlier module: all four bitstreams matched production.
  • The earlier 47/47 arm64 KUnit result covers the same assertions. This branch uses the current integration base. The hardware rows above used the earlier module.

Assisted-by: LLM (Codex)

Use the same segment-size predicate when matching a build and when validating the fallback variant. Cover both valid M2 builds and near misses in KUnit. Include the two observed segment sizes in the probe diagnostic.

Signed-off-by: Ryan Murray <[email protected]>

@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.

Independent source review at 4b35702880a6. Re-reviewed the replacement for #2938. This diff leaves the encoder start configuration unchanged. It reuses the same TEXT/DATA predicate after the build lookup, leaves the unpinned probe-only branch intact, and tests both accepted M2 layouts and near misses. The previous comment and provenance issue is absent. No source blocker found. The earlier hardware and KUnit rows are appropriately identified as earlier evidence; check the current CI before merging.

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Formal §1–§6 pre-PR checklist review at 4b35702880a6145297b498397b42a563d6f1d8d2:

  • §1 No model gating: Pass. Deduplicates the existing firmware segment-size check via ave_fw_sizes_match(), keeps the unpinned probe-only branch (!boot_qualified && !fw_text_size) intact, and introduces no chip/board/firmware gates.
  • §2 Production-ready: Pass. No new parameters, delays, or workarounds.
  • §3 Safety: Pass. Tightens test coverage of the firmware size refusal path and adds the observed TEXT/DATA sizes (%#zx) to the probe refusal diagnostic.
  • §4 Clean-room & attribution: Pass. Commit 4b35702880a6 carries human author/committer (Ryan Murray <[email protected]>) and human Signed-off-by only, with zero AI trailers in the commit and Assisted-by: in the PR body. The provenance-flagged comment from #2938 is absent.
  • §5 Evidence & modular/KUnit check: Pass. ave_fw_sizes_match() has its prototype in ave.h and compiles cleanly under modular builds (CONFIG_VIDEO_APPLE_AVE=m, where pre-existing VIDEO_APPLE_AVE_CMD_KUNIT_TEST stays disabled); no new module is added and the new assertions in ave-abi-test.c match ave_t8112 and ave_t8112_26b123 in ave-drv.c. Live CI (host-tests) is green at 4b35702880a6, and the earlier #2938 47/47 arm64 KUnit and J473/J413/J615 hardware rows are transparently documented for the same predicate/assertions.
  • §6 Naming: Pass.

Verdict: Approve.

Assisted-by: LLM (Gemini 4 Neon)

@RyanTheTide
RyanTheTide merged commit adfbaf3 into integration/aurora Nov 23, 2026
1 check passed
@RyanTheTide
RyanTheTide deleted the m2-merge/ave-size-refusal branch November 27, 2026 13:21
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