Skip to content

kboot: hand the T8132 camera over by the tree, not a board list - #494

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
kazuhidet:j715/isp-tree-gate
Nov 24, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:mainfrom
kazuhidet:j715/isp-tree-gate

Conversation

@kazuhidet

Copy link
Copy Markdown
Contributor

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.dtsi describes the ISP disabled, with the empty isp-firmware-text/isp-firmware-data placeholders and the isp-heap window;
  • every T8132 laptop includes it through 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-isp node that has all three of isp-firmware-text, isp-firmware-data and isp-heap is 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.
  • Trees without that description are left alone, as before.

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:

  • the J715, through t8132-laptop.dtsi;
  • the iMacs J623/J624, through t8132-j623-j624.dtsi. Their camera and its presets are not verified here, so an iMac row is needed before this merges.

Unchanged:

  • The Mac mini (t8132-j773g.dts, t8132-desktop.dtsi) has no ISP description.
  • J713 and J604: their trees already met these conditions, so they should behave exactly as before. I can't test them here.

Tests

  • test_j713_isp_handoff.py:
    • a J715 tree with the J713 description is handed over;
    • a tree without isp-firmware-data, or without isp-heap, is left alone (faults 23 and 24).
  • Negative control: with main's kboot.c, the J715 case fails at its first check_region().
  • Repository checks:
    • tests/python: 1097 passed, 27 skipped, 1 failed. The failure is test_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=1 builds;
    • clang-format (21) is clean on kboot.c.

J715 hardware row (MacBook Air 15-inch, M4, Mac16,13). Setup:

Before (board list) After (this commit)
ISP node disabled, no platform ID okay, apple,platform-id = 0x18, apple,dapf-ranges filled (208 bytes)
isp-firmware-text/-data empty reg + iommu-addresses filled, okay
ISP DARTs disabled okay
apple-isp not loaded bound; /dev/video0 apple-isp; PipeWire lists the camera
ISP/sensor power domains off off until a stream starts, off again after it
Capture — v4l2-ctl: 1 frame 1280x720 NV12 (1382400 bytes), 0.81 s, exit 0; sensor 0x958, 13 configs, platform 0x18
LED off on only during the capture, off right after
  • Regression counts (after):
    • SELinux: N/A (not installed).
    • Failed units: 2, both local services of this install (j713-owner-assets, m4-j715-backlight), the same on the everyday boot.
    • Kernel errors: the known two (avd probe -2, hid-generic … no listeners).
    • DART faults: 0.
    • These came up as before: the MTP keyboard and trackpad, the display, the GPU, and the sound cards with speaker protection running. No speaker test was done.
  • The capture was a single frame with the lens covered.
  • The "before" column is from the J715's everyday boot. It uses an older aura that has the same board list, and the same ISP description in its tree. Main's board list excludes the J715 in the same way, but I didn't boot main without this commit.
  • The same result with an older base. I first ran the change on an older aura base (3d517e63 plus the same local parts), whose handoff doesn't fill apple,dapf-ranges yet. 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):

  • the FDT: J713 ISP handed over line;
  • one capture;
  • the regression counts.

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>

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

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.o is unconditionally in OBJECTS (Makefile:268) and dt_set_j713_isp() is called from kboot_prepare_dt() (src/kboot.c:12987). Code-size delta looks neutral/tiny (drops two fdt_node_check_compatible checks + board strings, adds two fdt_path_offset checks reusing existing literals), but stage1-size must pass on CI before merge.
  • §1 No model gating: Pass. dt_set_j713_isp() (src/kboot.c:10820-10833) removes the apple,j713 / apple,j604 board list and gates on the tree's own contract on T8132 (chip_id == T8132, apple,t8132-isp with status = "disabled", and all three reserved-memory nodes isp-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-id comes from ADT /arm-io/isp sensor-type, segments come from ADT segment-ranges, and DAPF windows come from dapf_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 returns 0 without mutating placeholders on T8132 trees (either no isp alias or status = "disabled").
    • Non-T8132 SoCs and T8132 trees without t8132-isp.dtsi (e.g. Mac mini t8132-j773g.dts) are completely untouched.
  • §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.py adds a J715 positive test and missing-isp-firmware-data / missing-isp-heap negative controls (faults 23–24).
    • Non-blocking note: the header comment above dt_set_j713_isp_one() (src/kboot.c:10619) still opens with J713 and J604:; fine to leave or update opportunistically.
  • §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 stale apple,dapf-ranges property is dropped and Linux's apple_isp_hw_t8132 (.dapf_from_dt = true) fails probe cleanly with -ENODEV.
  • §4 Clean-room & attribution: Pass. Single commit cab3177c06ed73fa3da94321870d5807dec311d1 has human author/committer (Kazuhide Takahashi <kazuhide.t@linux-powered.com>), human Signed-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)

  1. 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 currently action_required (fork PR awaiting maintainer workflow approval). All 6 must run and pass on cab3177c06ed73fa3da94321870d5807dec311d1 (notably stage1-size for Stage 1 linkage, and format-check with clang-format==20.1.8).
  2. §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 includes t8132-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.dtsi includes t8132-isp.dtsi with 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.

@kazuhidet

Copy link
Copy Markdown
Contributor Author

Thanks for the review. Two rows I can't produce here: a J713/J604 no-regression boot and an iMac boot.

J713 / J604.

  • @samuelkurt, you just confirmed u-boot#69 on a J604 (input: apple_mtp_kbd: leave an MTP handed to the OS halted alone u-boot#69); @erikwb, you brought the J713 camera up in linux#531, and @MuBai-He, you tested it there.
  • Could one of you boot an aura built from this branch (cab3177c06ed, built the way you build your Stage 2) in place of 1.0.0b15, with your usual kernel and device tree?
  • On those trees the handoff should be exactly as before, since they already met the new conditions. A 27.2 boot (the window growth path) would be ideal, if you're on it.

What to report:

  1. The aura line FDT: J713 ISP handed over, platform ID 0x… (or a refusal line).
  2. One short capture with the camera, and whether the indicator LED behaves as before.
  3. Regression counts: SELinux denials, failed units, new kernel errors.

iMac (J623/J624).

  • t8132-j623-j624.dtsi includes t8132-isp.dtsi, so this change starts the handoff there. The presets there are the J713's IMX958 ones, and I haven't seen them checked against an iMac ADT.
  • If nobody has an iMac on hand, that's a maintainer call. One option is to keep the iMacs out of the handoff until they're checked, by not including t8132-isp.dtsi in their tree. That is a Linux DT change, not an aura one.
  • I haven't checked what happens on an iMac if the ADT or the presets differ. The handoff refuses on ADT records it doesn't expect, but a preset mismatch would only show at stream start.
  • Anyone with an M4 iMac on aurora: the same three items as above would settle it.

@samuelkurt

Copy link
Copy Markdown

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.

  • aura, same as on 1.0.0b15 on this Mac:
    FDT: J713 ISP TEXT at 0x10000d30000 (+0xca4000), runs at 0x10000000000
    FDT: J713 ISP DATA at 0x10001f40000 (+0x748000), runs at 0x10000ca4000
    FDT: J713 ISP handed over, platform ID 0x2e, 13 address filter windows
  • Camera: apple-isp binds (sensor 0x958, platform 0x2e). A 30-frame 1280x720 NV12 capture from /dev/video0 gives a normal image, as on b15. The LED is on only while streaming, as before.
  • Regression counts: SELinux Enforcing with 0 AVC denials; failed units 0; new kernel errors 0. The only error lines (brcmf -52, erofs -4) are known on this Mac and also appear on its b15 boot.

@github-actions github-actions Bot added changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks required sections (bot) labels Nov 24, 2026

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

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.

@DjDeveloperr
DjDeveloperr dismissed their stale review November 24, 2026 22:23

Superseded by the review at cab3177

@github-actions github-actions Bot added ready-to-merge Meets the merge policy: merge it (bot) and removed changes-requested A reviewer requested changes (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) labels Nov 24, 2026
@DjDeveloperr
DjDeveloperr merged commit 3ed3477 into aurora-silicon:main Nov 24, 2026
15 checks passed
DjDeveloperr pushed a commit that referenced this pull request Nov 24, 2026
Since 3ed3477 (#494) the tree decides which T8132 machines get the
camera handoff, so the comment above the ISP handoff no longer names
only the J713 and the J604. Comment only; no code change.

Signed-off-by: Kazuhide Takahashi <kazuhide.t@linux-powered.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-template PR body lacks required sections (bot) ready-to-merge Meets the merge policy: merge it (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants