Repository navigation
media: apple: isp: report and propagate sensor tuning failures - #668
Merged
Merged
Conversation
NV12 setup ignored every setfile error except EINTR, including a bad header, a short file and a rejected firmware upload. This made an unusable tuning file look like a stream running with model tuning. Keep absent tuning optional, but fail setup for other read, validation and upload errors. Log failed uploads and add a debug message for a successful upload. Exercise failure propagation and missing-file fallback at the capture setup boundary with KUnit static stubs. Distinguish model-wide sensor setfiles from per-module iCCl factory data in Kconfig and document the existing NR commands, P010 omissions and the unimplemented factory calibration/ANE interfaces. Do not change the qualified preview sequence or guess undocumented firmware parameters. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The preview fixture describes P010, whose flicker request has no output. The new tuning failure cases use NV12, whose existing flicker request returns a 12-byte record. Keep both expectations in the shared transport stub so the tests validate the appropriate command ABI. Clarify that a completed tuning upload is a transport result rather than proof that the firmware applied every coefficient; its NV12 reply fields remain undecoded. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
NV12 stream setup silently ignored invalid sensor setfiles and upload errors, so a short file, wrong magic or failed transport could leave the camera streaming without the requested tuning. Keep an absent setfile optional, but propagate other read/validation/upload failures and log the upload result. Add KUnit coverage showing that setup stops after a failed load and continues when tuning is absent.
Clarify that
isp_*.datis model-wide sensor tuning, separate from per-module iCCl. Document the NR commands already issued for NV12, the minimal P010 path's omission of tuning/NR, and the unknown module calibration and ANE interfaces. An upload completion message confirms transport only; NV12 does not decode the firmware's setfile reply fields.Companion installer extraction: aurora-silicon/aurora-installer#71
Validation:
W=1 KCFLAGS=-Werroron defconfig + asahi.config with Rust disabled. The initial Rust-enabled preparation failed in unrelated generated bindgen layout assertions; this is a focused C-driver build, not a complete kernel build.checkpatch --strict: zero errors, warnings or checks. Worktree clean.This is partial image-quality work. NV12 already sends CNR/MBNR, temporal-filter start/enable and motion-history commands. It is not yet proven that those implement the macOS MCTF policy. The iCCl payload/serial-binding/upload ABI and safe P010 NR sequence require a precise Daybreak specification before implementation; neither is guessed here. The separate ANE stage remains later work.