Repository navigation
media: apple: isp: power the T8132 ISP down as macOS does - #1918
IronsideXXVI wants to merge 1 commit into
Conversation
macOS powers the J604's ISP (M4 MacBook Pro 14", T8132) down without writing the coprocessor control word 0; read from the ISP's MMIO in two macOS camera sessions. This driver writes it 0 at every power-down on everything but T8140. On T8132 leave it alone by default and let the next boot accept the start word (0x10) the domain kept after such a power-down; the boot still writes 0 then 0x10. macos_stop=N gives back the old power-down. Assisted-by: LLM Signed-off-by: Dylan Ironside <dylan@dylanironside.io>
|
Tested on a J604 (MacBook Pro 14", M4, Mac16,1; os-fw 26.6.2, system-fw 27.0; aura 1.0.0b13). The kernel was alarm-aurora's pkgrel 38 recipe on
Disclosure: an LLM (Claude) ran these tests on my Mac and drafted this. I did the listening and looking, reviewed it, and am responsible for it. Assisted-by: LLM |
|
Thanks for tracking down the first-open ISP boot failure and comparing it against macOS's power-down. We select behaviour by a hardware property, not by the chips it was checked on. The reason given here is macOS behaviour, but it is enabled only on T8132 through match data ( Could you either make "leave the coprocessor control word alone at power-down" the default for every ISP generation, or, if some generation really needs the old write, keep the flag for that generation only and note the hardware reason in a code comment? Please also drop If you make it the default, we can run camera first-open rows on our M1 Pro, M2, M4 Pro and A18 Pro. |
On T8132, the camera's first stream after system boot failed its ISP firmware boot once. The next open streamed. Reading the ISP's MMIO in two macOS camera sessions on a J604 (14" MacBook Pro M4) showed that macOS never writes the coprocessor control word 0 when it powers the ISP down. This driver wrote it 0 at every power-down on everything but T8140.
This patch leaves the control word alone on T8132 by default, as macOS does, and as the driver already does on T8140 for its own reason. The next boot then accepts the start word (0x10) that the domain kept, and still writes 0 then 0x10 as for a fresh start.
apple_isp.macos_stop=Nrestores the old power-down. Other SoCs are unchanged.Measured on the J604 (MEASURED 2026-11-14), with the same change in our kernel series, a true first open after boot (no earlier ISP boot in that boot's log): on three of three boots (our kernels 1.908 twice and 1.909 once; on 1.909 with the kernel's other first-open change switched off, so this one was tested alone), the first open streamed 30 of 30 frames in each of two runs, with 0 "failed to start camera" and 0 firmware boot retries. On our kernels up to 1.907, without it, the first open after boot failed: its firmware boot got no answer. (third check added 2026-11-14 18:00 UTC).
Please note that the change as it ran on the J604 also stopped writing the fabric words at power-down, in a core-park path that is in our series but not in
integration/aurora.integration/aurorawrites no fabric words at power-down, so only the control-word part applies here. This exact patch has been built onintegration/aurora7c71d6d (checkpatch --strict 0/0/0,drivers/media/platform/apple/isp/builds with W=1 and no warnings), but it has not been run on its own on the J604.Update 2026-11-14 18:50 UTC: our kernel series carried three earlier workarounds for this failure (a 1.5 s minimum off time, a firmware boot retry and keeping the detecting firmware up). With this change alone the first open passed, so the next J604 kernel drops all three. This patch is the whole fix we propose; nothing else from that series is needed.