Repository navigation
soc: apple: display gate: bring the T6041 externals up on a late PMP - #905
Merged
Merged
Conversation
The T6041 gate powers the M4 Pro external display chain up when the PMP binds. If that took more than 20 s it fell back to the internal panel and ignored a PMP that bound later, for the whole boot. On an encrypted root apple-pmp.ko lives on the root file system and loads only after the passphrase, so a J616s showed apple-t6041-display: no PMP within 20000 ms: external displays stay off, internal panel only (0) apple_pmp 500700000.pmp: PMP firmware and endpoint ready at 20 s and 55 s, and never had external displays. Holding the display subsystem back past the deadline costs nothing: appledrm needs apple-pmp's symbols, so it cannot drive any display before the PMP is there. The deadline now only lets the Type-C port controllers go with the USB muxes only, so that a Type-C keyboard works at the passphrase prompt; the routes are disabled again for that, as the fallback did. A PMP that binds later, before or after the deadline, powers the chain up. Past the deadline the routes come back in the same changeset as the processors and the display subsystem, so each processor registers them when it probes and the display master is still created once with every DART in its iommus. The released controllers then need the display mode switches. Probing a controller again takes its USB host down, so it is done once, and only for the controllers still wired to an enabled route, after every processor that still has an enabled route is bound (bus notifier, BOUND or NOT_BOUND of a processor). Each gets the managed link to its processor that fw_devlink would have made of the held controller's fwnode link, so a processor that unbinds still takes its controllers along. A controller whose routes its processor gave up on keeps its USB-only probe. The internal panel fallback stays, for a PMP whose probe failed: one still unbound at the deadline, or STAGED_PMP_WAIT_MS after a failure past the deadline. NOT_BOUND is also sent for a deferral, so a deferring PMP gets that long to bind. A power-up that fails falls back as before. The steps of the power-up are now a small state machine (waiting, released, started, fallback) whose transition function the display gate KUnit test checks, in a new T6041 suite. Assisted-by: LLM Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Contributor
Author
Hardware test, 2026-11-04 (fleet16 merge lane)Kernel 7.3.0-aurora-f16c1: integration/aurora 67c64c8 plus this PR plus #902, using the fleet15 recipe and config (unchanged). The merged tree equals this branch (7262c1a) merged with #902 (3e6e80c). All boots were one-shot; fleet15 stayed the default. J616s (T6041), against the fleet15 baseline 348af05f
Neo (T8140) and M2 (T8112): the same f16c1 boots are row-clean against fleet15, with no change. Details are on #902. Gates (buildbox)
Assisted-by: LLM 🤖 Generated with Claude Code |
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.
On an encrypted root the T6041 display gate gave up on the M4 Pro external displays for the whole boot. apple-pmp.ko loads only after the passphrase, the gate's 20 s PMP wait ran out first, and the PMP that bound at 55 s was ignored:
The distro side (apple-pmp and appledrm in the initramfs) is aurora-silicon/alarm-aurora#117. This is the kernel side, so a late PMP bind works on every distro.
What changes
/display-subsystem, so each dcpext registers them when it probes, and the display master is still created once with every DART in its iommus.apple-display-gate-t6041.On an unencrypted install (PMP bound at about 1.8 s) nothing changes: stage 0, stage 1, then processors and display subsystem.
Tested
kunit.py run --arch=arm64(native gcc, qemu virt) with APPLE_DISPLAY_GATE, its KUnit test and PROVE_LOCKING: 49/49 pass, including the existing T6030, T6031 and T8122 suites.make W=1 drivers/soc/apple/for arm64 (gcc): no warnings.DECLARE_WORK/ notifier lines right after their functions, matching the existing code.Needs hardware
Not run on a J616s yet. Needed:
🤖 Generated with Claude Code