Skip to content

soc: apple: display-gate: enable T6041 external chains independently (fixes j614s external displays) - #1551

Merged
DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
petrskuta:j614s-display-gate-independent-chains
Nov 11, 2026
Merged

DjDeveloperr merged 1 commit into
aurora-silicon:integration/aurorafrom
petrskuta:j614s-display-gate-independent-chains

Conversation

@petrskuta

Copy link
Copy Markdown
Contributor

Summary

On the MacBook Pro 14" M4 Pro (j614s), no external display works, over USB-C or HDMI. On j616s both work.

The cause: gate_t6041_staged() requires both external chains (HDMI/dcpext0 and Type-C/dcpext1) to have firmware memory before it enables anything. On j614s the boot loader publishes dcpext1's memory but refuses dcpext0's, so the gate returns early and the working Type-C chain stays off too.

This change makes the gate enable each chain on its own, the way gate_t6041_max_run() already does for J616c:

  • staged_on records which stages passed staged_ready(). A stage that fails it stays untouched and no longer blocks the other one.
  • staged_set(), staged_apply(), staged_unbound_infra(), staged_power_up() and staged_hold_port_controllers() only act on enabled stages.
  • HDMI-only boots (no Type-C chain): dcpext0's Type-C routes stay disabled, and the three Type-C crossbars its mux-controls name are enabled with the HDMI stage, so dcpext0 does not defer on them.

j616s, with both chains handed over, takes the same path as before.

Why dcpext0 is refused on j614s (not fixed here)

On this j614s the ADT has no /arm-io/dcpext0 and no dart-dcpext0. The HDMI processor is dcpext2:

ADT node CPU address
/arm-io/dcpext2 0x606e00000 (crossbar UFP endpoint 2, dp-audio3)
/arm-io/dispext2 0x604000000
/arm-io/dart-dcpext2 0x606340000
/arm-io/dart-dispext2 0x606300000

In the PMGR table, DISPEXT0_SYS/FE/CPU are no_ps (virtual) on this machine. DISPEXT2_SYS/FE/CPU are real registers at 0x5028004e0/0x5028004e8/0x5028004f0. DISPEXT1_CPU (0x5028004a0) is also real here, while j616s marks it no_ps.

So the shared t604x-j614-j616.dtsi HDMI description (dcpext0 at 0x3a2e00000) matches j616s but not j614s. aura's t6041_ext_fill() correctly refuses it (dcpext0 firmware memory refused). HDMI on j614s needs a j614s dcpext2 description in the DT, in aura's t6041_exts and in the gate. That is left for a follow-up.

Testing

Machine: MacBook Pro 14" M4 Pro, apple,j614s / apple,t6040. Built with the linux-aurora 7.3.0.aurora1-30 config, clang 23.1.4 / Rust 1.99.1, on d4bb17303. The commit was then cherry-picked unchanged onto 8b538d871; display-gate.c is identical in both, and the rebased tree was not rebuilt. Boot loader: aura 1.0.0b10, os-fw 26.6.2.

Kernel log with this change:

apple-t6041-display: /dcp@3a2e00000: no firmware memory, nothing enabled
apple-t6041-display: HDMI chain not handed over: Type-C displays only
apple-t6041-display: routes enabled, waiting for the PMP
apple-t6041-display: stage 1 enabled
apple-t6041-display: processors and display subsystem enabled
apple-dcp 602e00000.dcp: DCP booted
apple-dcp 602e00000.dcp: dcp_hotplug() connected:1 valid_mode:0 nr_modes:23

Results:

  • USB-C DisplayPort monitor, coldplug, 2560x1440 (card1-DP-1 connected, enabled): pass
  • Internal panel: pass
  • HDMI port: fail, expected (dcpext0 does not exist on j614s; see above)
  • USB-C hotplug, other ports, suspend/resume with an external display: not tested
  • j616s (both chains present): not tested. That case runs the same code path as before.
  • KUnit (APPLE_DISPLAY_GATE_KUNIT_TEST): not run

🤖 Generated with Claude Code

gate_t6041_staged() enables the external display chains only when both
the HDMI (dcpext0) and the Type-C (dcpext1) processors have firmware
memory. On the 14-inch M4 Pro (J614s) the ADT has no dcpext0: its second
external processor is dcpext2 at 0x606e00000, and DISPEXT0 is virtual
there. The boot loader refuses dcpext0's memory, publishes dcpext1's,
and the gate then returns early, so the Type-C chain stays off too and
the J614s has no external display at all.

Record which stages are ready and enable each one on its own, as
gate_t6041_max_run() already does for the J616c. A stage that is not
ready is left untouched. Without the Type-C chain, dcpext0's Type-C
routes stay disabled and the Type-C crossbars its mux-controls name are
enabled with the HDMI stage, so it does not defer on them. With both
chains handed over (J616s) the sequence is unchanged.

Tested on J614s: a USB-C DisplayPort monitor works through dcpext1;
the internal panel is unaffected.

Signed-off-by: Petr Škuta <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>

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

Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.

Important support-scope correction: this patch fixes independent admission of the working J614s Type-C display chain, not J614s HDMI. The report explicitly says HDMI still fails because that board uses dcpext2, while the shared description is dcpext0; that separate DT/loader/gate work is outside this PR. I approved the pending host/SEP CI so the reviewed independent-chain logic can be checked. Keep HDMI-only/neither/both-chain fail-closed behavior and the three HDMI mux dependencies intact. Existing evidence is a coldplug USB-C1440p success with an identical display-gate source file; hotplug, other ports, external-attached sleep and J616s both-chain regression remain follow-ups. Do not let a website row turn HDMI Working solely when this PR merges.

@petrskuta

Copy link
Copy Markdown
Contributor Author

Additional test results on j614s, built from this branch's commit (kernel 7.3.0-j614s):

  • Second USB-C port, coldplug: pass. AOC 1440p monitor connected directly over its USB-C input (DP alt mode with PD, no dock). It came up as card1-DP-2 (the first test was DP-1 on another port) at [email protected] next to the internal panel at 3024x1890@120. The Mac charges from the monitor at the same time.

    apple-t6041-display: HDMI chain not handed over: Type-C displays only
    apple-t6041-display: stage 1 enabled
    apple-t6041-display: processors and display subsystem enabled
    apple-dcp 602e00000.dcp: DCP booted
    apple-dcp 602e00000.dcp: dcp_hotplug() connected:1 valid_mode:0 nr_modes:32
    
  • Two USB-C monitors at once: fails, as expected. Only dcpext1 is available. The second display logs this and waits; the logged behaviour looks correct:

    apple-dcp 602e00000.dcp: display on USB-C Left Front waits for a free external display pipeline (each one drives another display); it lights up on its own when one of those displays is unplugged
    

    DP alt mode was active on both ports. This needs dcpext2, like HDMI.

  • Apple Studio Display over Thunderbolt: fails, out of scope. The port sees a partner, but no DP alt mode is entered. This would need display support over Thunderbolt.

Still not tested: hotplug after login, the third USB-C port, sleep/resume with an external display attached, and j616s.

🤖 Generated with Claude Code

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

Codex (GPT-6.1 Sol), reviewing on @DjDeveloperr’s behalf.

No blocking source finding remains in bd2ce07. Each chain is admitted only after complete staged_ready checks; neither-ready returns before mutation. DCP/route changes, DART additions, power-up and port-controller holds remain scoped to admitted stages. With both chains present, the prior stage order and PMP/timeout/late-route behavior remain unchanged. The HDMI-only route children stay disabled; the three extra Type-C crossbars are not acquired by those disabled routes, while the fixed HDMI dp-xbar remains in the waited HDMI infrastructure. An independently investigated missing-wait concern did not establish a source bug, so no speculative patch was added.

The author’s new second-port J614s coldplug/DP-alt-mode/PD result strengthens the existing narrow Type-C evidence. It is not a two-monitor success: only dcpext1 is available and the second monitor waits for a pipeline. HDMI remains the separate dcpext2 DT/loader/gate follow-up; Studio Display over Thunderbolt is outside this fix. Hotplug after login, the third port, external-attached suspend and J616s physical regression remain untested. The comment names a branch-built kernel rather than a full SHA, and keeps that scope.

Current host/source/Rust/KUnit checks pass. SEP Rust/KUnit are not being cited as a display-gate object or all-stage-combination test. Source review plus the board-scoped reported coldplug evidence supports merging this independent-chain fix, without qualifying HDMI, dual external displays, Thunderbolt, all ports or suspend. No new build, hardware test, playback, loader installation or default change was performed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants