Repository navigation
media: apple: isp: bound exposure metadata and keep controls gated - #978
Conversation
|
@DjDeveloperr @RyanTheTide ready for your regression testing. It hasn't been boot-tested on J613 with 7.3 yet; I'll post the result here when I have it. Still a draft until the camera gain is checked on J613 hardware. |
|
J613 boot result on 7.3 (rubra, M3 MacBook Air 13", macOS 26.6.2 / 25G83 firmware), 2026-11-05.
For this PR: the camera node comes up. Frame-gain image quality hasn't been judged yet. |
RyanTheTide
left a comment
There was a problem hiding this comment.
The net change against integration/aurora is small: the section-table bound in isp_meta_read_exposure(), the meta_exposure gate in isp_init_exposure_ctrls(), and the two KUnit additions (37 lines). The history doesn't match that:
- 16e17fc ("Prepare the original context ...") removes about 800 lines of integration's ISP code, including the T6040/P010 support and the existing frame gain/exposure reporting.
- ba71c00 then re-adds "media: apple: isp: report the frame gain and exposure", which integration already has.
- d83a42a composes the two back again.
The intermediate commits don't build to a working driver for T6040/T8140, so bisecting breaks. Also, 16e17fc's subject has no subsystem prefix. Please drop those three commits and carry the net change as a single commit on integration/aurora (for example media: apple: isp: bound the exposure section entry and gate the controls in the helper), keeping the original author credit in the message if you want it.
Testing: T8122 keeps meta_exposure off, so this change doesn't need a J613 gain check. The new size check does run on T8140 and T6040, though. Please run isp_test_meta_exposure and isp_test_exposure_control_gate under KUnit. Those two boards also need a capture showing that V4L2_CID_GAIN and V4L2_CID_EXPOSURE_ABSOLUTE still update.
…rols in the helper Reject metadata that cannot contain the exposure section-table entry. Keep exposure controls disabled when the hardware does not report exposure metadata, and cover both cases with KUnit. Signed-off-by: Satya Benson <satya@benson.earth> Assisted-by: LLM
76db723 to
8f9ffa3
Compare
|
Replaced the remove/re-add history with one |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.
The current net bounds/helper-gate change and history cleanup look good; the posted two targeted KUnit passes cover the requested source regressions. T8122 has metadata exposure disabled, so a J613 camera test cannot close the live-control gate. Keep draft pending capture on T8140/Neo and T6040 showing V4L2_CID_GAIN and V4L2_CID_EXPOSURE_ABSOLUTE still update with no new ISP/DART errors. Hardware coordination request sent to ryan-orch-regress; frames must remain local.
|
Hardware results (unattended run). Boards: J700 (T8140) and J616s (T6040). Both boards pass, with numbers identical to the baseline:
Not covered: image quality, T8122. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.
The remaining gate is now satisfied by Ryan's posted hardware result #978 (comment): unchanged head8f9ffa30 merged into fleet63/84d091f7 on J700/T8140 and J616s/T6040, same baseline config, one-shot/default untouched. On each board eight150-frame streams lose no frames; read-only/volatile gain and absolute exposure update within range, writes return EACCES, and no new ISP/DART faults. Reported arm64 QEMU suites pass39/39 and11/11, including the targeted gate/bounds cases. Existing exact-head host CI is green.
Re-reviewed the current net2-file change: the section-table entry is bounded before its read, the helper preserves the existing hardware-profile gate, and the single-commit history retains newer T6040/P010 support. No blocking source/review findings remain. Ready to leave draft and merge this bounded metadata fix. These are attributed unattended control/metadata results, not visual image quality, T8122 metadata support, or physical input testing.
Preserve the merged exposure bounds and control-gate tests from PR aurora-silicon#978 alongside the suspended-return and error-wakeup containment cases. Retain both complete test functions and all registrations. Signed-off-by: Diljit Singh <hey@djdev.me>
Aurora already has frame gain/exposure reporting from Ryan’s original #689. Port the remaining section-table entry bound and short-header/control-gate regression tests. Make the helper enforce the same hardware-profile gate as Aurora’s existing caller, and retain newer T6040/P010 support. T8122 metadata units/layout remain unqualified and gain reporting stays gated off.
Port of omacom/linux-aurora#349. The original PR remains untouched.
Carried dependency:
ef2275f384be(carried commitba71c0044845), media: apple: isp: report the frame gain and exposure, original author Ryan Murray: carried unaltered from omacom/linux-aurora. Its complete patch, message, authorship and dates are preserved; the separate 7.3 adaptation retains Aurora’s existing capture support.@RyanTheTide
This carries Ryan Murray's additional metadata bounds and regression coverage from omacom/linux-aurora unaltered, because Aurora doesn't have it yet and this change builds on it. If you'd rather land it separately or differently, say so and I'll rework this.
Validation: arm64 defconfig + asahi.config, Image/modules/DTBs with BTF and KUnit enabled, LLVM 18/Rust 1.85.0, passed at stack top #349 (
76db72372939), which includes this branch. The validated integration base is b500668. QEMU loaded the test-bearing modules successfully with no additional failures. The combined run retains four pre-existing SEP store failures (plus their suite aggregate), reproduced on the unmodified Aurora base. The unmodified pinned base also crashes in apple-av-audio-lifetime/av_lifetime_devres_order; that unrelated audio suite is explicitly excluded. All tests added by these ports run through KUnit debugfs on Cortex-A76. This is not a fully green or complete-tree KUnit run. The additional short-header/control-gate KUnit coverage ran in QEMU. The latter first caught the missing helper-side check; the production helper was corrected while retaining the caller gate and unchanged assertions. No 7.3 hardware boot or deployment has been performed.