Repository navigation
kboot: hand the T8132 camera over by the tree, not a board list - #494
Conversation
dt_set_j713_isp() hands the camera over only on the J713 and the J604:
return; /* No other M4 board's camera handoff is qualified. */
But the kernel tree already says which machines want the handoff:
t8132-isp.dtsi describes the ISP disabled, with empty isp-firmware-text
and isp-firmware-data placeholders and the isp-heap window. Every
T8132 laptop includes it through t8132-laptop.dtsi, and so do the
J623/J624 iMacs. On the J715 (15-inch
M4 Air), with the same IMX958 camera, the ISP therefore stays disabled
and the camera never appears.
Let the tree decide: on T8132, a disabled apple,t8132-isp node with all
three of isp-firmware-text, isp-firmware-data and isp-heap is a handoff
target. dt_set_j713_isp_one() still checks every ADT record and leaves
the tree untouched when it refuses. Trees without the description are
left as they are, as before.
test_j713_isp_handoff.py hands over a J715 tree with the same
description, and leaves a tree without isp-firmware-data or without
isp-heap alone. With the old board list the J715 case fails at its
first check_region().
Tested on a J715 (OS firmware 26.6.2):
- the ISP is handed over (platform ID 0x18) and apple-isp binds;
- one 1280x720 NV12 frame is captured;
- the LED is on only while streaming.
Signed-off-by: Kazuhide Takahashi <kazuhide.t@linux-powered.com>
There was a problem hiding this comment.
Pre-PR checklist (§1–§6) review at cab3177c06ed73fa3da94321870d5807dec311d1 (base main 8b1cb8ce52fa, MERGEABLE): REQUEST_CHANGES (0 code, test, safety, or attribution blockers — holding merge on exact-head CI and cross-board T8132 §5 hardware rows).
Checklist Audit (§1–§6)
- Stage 1 impact (§3): Yes.
kboot.ois unconditionally inOBJECTS(Makefile:268) anddt_set_j713_isp()is called fromkboot_prepare_dt()(src/kboot.c:12987). Code-size delta looks neutral/tiny (drops twofdt_node_check_compatiblechecks + board strings, adds twofdt_path_offsetchecks reusing existing literals), butstage1-sizemust pass on CI before merge. - §1 No model gating: Pass.
dt_set_j713_isp()(src/kboot.c:10820-10833) removes theapple,j713/apple,j604board list and gates on the tree's own contract on T8132 (chip_id == T8132,apple,t8132-ispwithstatus = "disabled", and all three reserved-memory nodesisp-firmware-text,isp-firmware-data,isp-heap).- Audited
dt_set_j713_isp_one()(src/kboot.c:10640-10811): no hidden board-specific assumptions —apple,platform-idcomes from ADT/arm-io/ispsensor-type, segments come from ADTsegment-ranges, and DAPF windows come fromdapf_t8132_ranges("/arm-io/dart-isp", ...). - Audited interaction with
dt_set_isp()(src/kboot.c:10588→dt_set_isp_fwdata()→dt_fill_isp_placeholders(fdt_node, true)): cleanly returns0without mutating placeholders on T8132 trees (either noispalias orstatus = "disabled"). - Non-T8132 SoCs and T8132 trees without
t8132-isp.dtsi(e.g. Mac minit8132-j773g.dts) are completely untouched.
- Audited
- §2 Production-ready, no hacks: Pass. Default kernel command line, no sleeps/retries/workarounds. Checking all three placeholder/heap paths upfront also avoids unnecessary scratch-FDT allocation and spurious refusal logs on partial trees.
tests/python/test_j713_isp_handoff.pyadds a J715 positive test and missing-isp-firmware-data/ missing-isp-heapnegative controls (faults 23–24).- Non-blocking note: the header comment above
dt_set_j713_isp_one()(src/kboot.c:10619) still opens withJ713 and J604:; fine to leave or update opportunistically.
- Non-blocking note: the header comment above
- §3 Safety: Pass. All handoff parameters come from the machine's ADT with DRAM-bounds, 16 KiB alignment, non-overlap, and bounded IOVA-window validation.
dt_display_transaction()ensures any refusal rolls back the FDT atomically, keeping the ISP and its 3 DARTs"disabled". If no usable ISP DAPF filter exists, any staleapple,dapf-rangesproperty is dropped and Linux'sapple_isp_hw_t8132(.dapf_from_dt = true) fails probe cleanly with-ENODEV. - §4 Clean-room & attribution: Pass. Single commit
cab3177c06ed73fa3da94321870d5807dec311d1has human author/committer (Kazuhide Takahashi <kazuhide.t@linux-powered.com>), humanSigned-off-by:, zero AI trailers in commits, and clean-room content. - §6 Naming: Pass. No naming violations.
Blockers Before Merge (§5 — CI & Cross-Board Evidence)
- Exact-head CI not yet run/green on
cab3177c06ed73fa3da94321870d5807dec311d1:- All 6 workflows (
aurora-agent-policy,build,test,format-check,stage1-size,esp-stage2-size) are currentlyaction_required(fork PR awaiting maintainer workflow approval). All 6 must run and pass oncab3177c06ed73fa3da94321870d5807dec311d1(notablystage1-sizefor Stage 1 linkage, andformat-checkwithclang-format==20.1.8).
- All 6 workflows (
- §5 Cross-board T8132 hardware rows (maintainer / hardware-owner runs):
- Your J715 (OS firmware 26.6.2) row clearly proves the handoff, NV12 frame capture, LED/power-domain gating, and 0 DART faults / 0 new kernel errors.
- Because removing the board list activates
dt_set_j713_isp()on every T8132 DT that includest8132-isp.dtsi, merge still needs exact-head (cab3177c06ed) hardware rows for:- J713 and/or J604 no-regression boot (ideally including 27.2 firmware to cover the window-growth path):
FDT: J713 ISP handed over, one capture, and clean §5 regression counts (0 SELinux denials, 0 failed units, 0 new kernel errors). - iMac J623/J624 (as you flagged,
t8132-j623-j624.dtsiincludest8132-isp.dtsiwith IMX958 presets despite having no verified ADT yet): either a hardware row confirming the camera handoff/capture (or clean fail-closed refusal) with §5 regression counts, or an explicit maintainer decision / Linux DT check before turning it on for iMacs.
- J713 and/or J604 no-regression boot (ideally including 27.2 firmware to cover the window-growth path):
|
Thanks for the review. Two rows I can't produce here: a J713/J604 no-regression boot and an iMac boot. J713 / J604.
What to report:
iMac (J623/J624).
|
|
J604 (MacBook Pro 14-inch, M4): aura cab3177 (1.0.0b15-gcab3177c, the ESP Stage 2 flags with clang 22, as Fedora's aura package builds it) in place of 1.0.0b15. Booted as an aura-try trial and committed. Kernel 7.3.0-41.fc44.aurora, device tree unchanged, U-Boot da9bad51. OS firmware 26.6.2, system firmware 27.2. This isn't a 27.2 stub, so the window growth path isn't exercised. aurora-installer doesn't offer the 27.2 stub for the J604 yet.
|
DjDeveloperr
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at cab3177c06ed: the code is ready; it needs only a row at this head.
Blockers: none in the code. Missing row: samuelkurt's J604 boot of this head (aura cab3177 as an aura-try trial, then committed) covers T8132. The only thing left is the CI I've just approved, which has to pass. An iMac or J713 boot comes after the merge.
Checked: thank you. No Apple material. This removes a board list: the camera is handed over by the tree.
Superseded by the review at cab3177
dt_set_j713_isp()hands the T8132 camera over only on the J713 and the J604 (/* No other M4 board's camera handoff is qualified. */). The kernel tree already marks which machines want the handoff:t8132-isp.dtsidescribes the ISP disabled, with the emptyisp-firmware-text/isp-firmware-dataplaceholders and theisp-heapwindow;t8132-laptop.dtsi.So on the J715 (15-inch M4 Air), which has the same IMX958 camera, the ISP stays disabled and no camera appears.
This lets the tree decide, as #429 does for the DAPF handoff. On T8132, a disabled
apple,t8132-ispnode that has all three ofisp-firmware-text,isp-firmware-dataandisp-heapis a handoff target.dt_set_j713_isp_one()is unchanged: it still checks every ADT record, and when it refuses it leaves the tree as it was, with the camera off.Behaviour change. Every T8132 tree with that description is now handed over, not only the J713 and J604. In the current kernel trees, that adds:
t8132-laptop.dtsi;t8132-j623-j624.dtsi. Their camera and its presets are not verified here, so an iMac row is needed before this merges.Unchanged:
t8132-j773g.dts,t8132-desktop.dtsi) has no ISP description.Tests
test_j713_isp_handoff.py:isp-firmware-data, or withoutisp-heap, is left alone (faults 23 and 24).kboot.c, the J715 case fails at its firstcheck_region().tests/python: 1097 passed, 27 skipped, 1 failed. The failure istest_live_rtkit_description.py::test_chained_stage_publishes_the_record_like_the_handing_stage, which fails the same way on main without this change;make RELEASE=1builds;clang-format(21) is clean onkboot.c.J715 hardware row (MacBook Air 15-inch, M4, Mac16,13). Setup:
7.3.0-j715-aurora+(integration/aurora0abc2f385 + local J715 patches).t8132-isp.dtsidescription and the #2745-style MTP description.8b1cb8ce+ this commit + dapf: take the T8132 handoff from the tree, not a board list #429 (needed for the MTP on this tree), plus two local-only parts that are the same as in dapf: take the T8132 handoff from the tree, not a board list #429's row:disabled, no platform IDokay,apple,platform-id= 0x18,apple,dapf-rangesfilled (208 bytes)isp-firmware-text/-datareg+iommu-addressesfilled,okaydisabledokayapple-isp/dev/video0apple-isp; PipeWire lists the camerav4l2-ctl: 1 frame 1280x720 NV12 (1382400 bytes), 0.81 s, exit 0;sensor 0x958, 13 configs, platform 0x18j713-owner-assets,m4-j715-backlight), the same on the everyday boot.avdprobe -2,hid-generic … no listeners).3d517e63plus the same local parts), whose handoff doesn't fillapple,dapf-rangesyet. It gave the same handoff, capture and LED behaviour.Requests for J713, J604 and iMac (J623/J624) owners: a boot with this change, showing the camera behaves as before (or, on an iMac, comes up):
FDT: J713 ISP handed overline;