Repository navigation
media: apple: ave: name the M2 27.2 handshake source, test the refusal - #2938
RyanTheTide wants to merge 1 commit into
Conversation
Review follow-ups for the M2's macOS 27.2 encoder build: - The ave_t8112_26b123 comment now says where device 12 and handshake type 12 come from: the ADT names the chip (ave soc-id "t8112") and the build's device table numbers it 12/12, where the 13.5 build uses 18/15. - The plain size check in ave_fw_probe() now calls ave_fw_sizes_match(), the predicate ave_fw_select_build() already uses. The expression is the same, so no variant changes behaviour, and KUnit can now assert that the near-miss sizes of the M2 chain are refused rather than only that they fall back to ave_t8112. - That refusal now prints the TEXT and DATA sizes, as the builds[] path already does, so a third build is easy to identify from a log. - ave.h says when to describe a build with builds[] (same start, other CRC) and when with next_build (start fields of its own). Signed-off-by: Ryan Murray <[email protected]>
|
Review at e3cad61. Nits. The refactor is exact:
No further rows owed; the posted rows cover all three users of the touched path. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Formal §1–§6 pre-PR checklist review at e3cad61f515e657e7cc56fa4930c9f5f31230887.
Checklist Summary
- §1 No model gating: Pass —
ave_fw_sizes_match()is an exact logical refactor of the previousave_fw_probe()segment-size predicate; variants withbuilds[]still takeave_fw_find_build()first. - §2 Production-ready: Pass.
- §3 Safety: Pass.
- §4 Clean-room & attribution: Blocker (see below). Commit author/committer/
Signed-off-by:are clean human attribution (Ryan Murray <[email protected]>), zero AI trailers. - §5 Evidence: Complete — J473 (M2, 27.2), M2 Air (13.5), and J615 (M3 Air, 26B123) all pass with bit-exact / md5-identical encodes, s2idle, 0 SError/DART/AVC; KUnit 47/47 + host ABI tests pass.
- §6 Naming: Pass.
- CI (at review time):
host-testsgreen.
Blocking Finding
-
§4 Clean-room wording (
drivers/media/platform/apple/ave/ave-drv.c:82-84and commit message):"This build's device table gives that chip device 12 and handshake type 12, so the handshake names 12 for both (the 13.5 build, ave_t8112, uses 18/15)."Citing an internal table inside Apple's firmware image (
"This build's device table") in public kernel comments and the commit message violates §4 (hard): "No Apple code, strings, firmware, disassembly output or Apple tuning values in public code, PRs, issues or channels. Our own traces and measurements are fine." Please reword both the comment and commit message to cite observable hardware/measurement evidence only (e.g., that on J473 the 13.5 handshake values 18/15 fail/are refused while 12/12 completes the start handshake and produces bit-exact encodes).
Minor Cleanups (while amending)
drivers/media/platform/apple/ave/ave-fw.c:238: drop the leftover duplicate one-line comment/* Whether these are the segment sizes of one of v's builds */directly above the new block comment.- Optional: annotate
ave_fw_sizes_match()withVISIBLE_IF_KUNIT/EXPORT_SYMBOL_IF_KUNITso its non-static linkage is explicitly KUnit-scoped.
Verdict
REQUEST_CHANGES — code logic, tests, CI, and §5 hardware rows are all solid, but the §4 clean-room wording in ave-drv.c and the commit message must be fixed before merge.
Assisted-by: LLM (Gemini 4 Neon)
RyanTheTide
left a comment
There was a problem hiding this comment.
Independent source review at e3cad61f515e. The new helper keeps the exact size predicate and adds the refusal case; the reported encodes cover both T8112 firmware lines. The provenance concern in the existing review still applies to this head. Use independently documented device facts and observed handshake behavior as the source, and substantiate that provenance before merging the comment and commit text.
|
Superseded by #2963. The replacement covers the firmware size refusal and diagnostic while retaining the existing encoder start configuration. |
Problem
#2904 (the M2's macOS 27.2 encoder build) was merged at 4d459a4 while its review follow-ups were still being tested. The review had four non-blocking points: the source of device 12 / handshake type 12 wasn't named, the KUnit case only checked the fallback and not the size refusal, that refusal didn't print the sizes, and ave.h didn't say when to use
next_buildinstead ofbuilds[].Change
ave_t8112_26b123comment names the source the way the T8142 one does. The ADT names the chip (avesoc-id"t8112"), this build's device table numbers it 12/12, and the 13.5 build (ave_t8112) uses 18/15.ave_fw_probe()now callsave_fw_sizes_match(), the predicateave_fw_select_build()already uses. It's the same expression, so no variant changes behaviour. KUnit now asserts that the M2 chain's near-miss sizes are refused and that both real builds match.builds[]path, so a third build is easy to identify from a log.builds[](same start, different CRC/layout) and when to usenext_build(the build needs its own start fields and has its own sizes).Testing
The module was built from this head's
ave/against each Mac's default release (fleet82 or fleet81; theirave/equals the #2904 merge). One module swap, default cmdline, then a plain reboot back to the default:drivers/media/platform/apple/ave: 47/47 pass. The host ABI tests (run.py, run-recovery.py) pass. checkpatch --strict on the diff is clean.Still to run
Row detail
v4l2h264enc/v4l2h265encdefault andvideo_b_frames=0, ffmpegh264_v4l2m2mMain /hevc_v4l2m2mat 8 Mb/s, fixed raw 1080p30 source, 120 frames. The AVD decodes every stream (120 frames each).rtcwake -m freeze -s 15on the PMU RTC, rc 0, 16 s wall, on the J473 and the M2 Air.Assisted-by: LLM (Claude:Opus 5.5)