Skip to content

kboot: T6050: give the M5 Ultra Mac Studio its displays - #264

Open
funkzy wants to merge 4 commits into
aurora-silicon:mainfrom
funkzy:j775d-display
Open

funkzy wants to merge 4 commits into
aurora-silicon:mainfrom
funkzy:j775d-display

Conversation

@funkzy

@funkzy funkzy commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

What is missing

The Mac Studio (M5 Ultra, J775D) has no internal panel, so its device tree has no dcp/disp0 aliases, and the
T6050 handoff stops at "the device tree does not describe the internal display: no handoff". Its display subsystem
then never binds, and Linux has no display. dj's #178 listed this as still needed: "dcpext4..7 and the panel-less dcpext0 path".

What the J775D device tree asks of the loader

/display-subsystem is disabled with iommus = <&dart_dispext0 0>. dcpext0 (USB-C, die 0) and dcpext4 (HDMI,
die 1) are disabled, each with its DARTs, mailbox and a disabled pmc-metadata node that its own
apple,bw-scratch names. Each output's chain is disabled too: dcpext0's Type-C PHY with its mailbox and power
domains, its mux and the HPM; dcpext4's DP PHY and the GPIO controllers of its hotplug and power enables.

What this adds

On a board whose device tree has no dcp/disp0 aliases and whose display subsystem scans out through one
external engine's display DART (by the ADT's dart-dispextN), those are handed over through the external-engine checks dj added
(56e6d95, 5bcf3cb, 12a1bde, 2ee6d88): the engine's image for this OS firmware, running, power words, both
DARTs locked with their streams, its mailbox. In addition:

  • The engine the display subsystem scans out through (the one its single iommus DART belongs to, by the ADT's
    dart-dispextN) goes first, in one transaction with the subsystem. The boot framebuffer must lie in /vram, which
    is reserved no-map as framebuffer@ and becomes the memory-region of that engine and of the subsystem, as the
    panel path does (dj's faa355c).
  • The tree's apple,bw-scratch is kept when its PMC node's reg is the engine's ADT bandwidth block (dispextN
    reg[4]) and the offset lies inside it; that node is enabled.
  • Each engine's route (PHYs with their mailboxes and power domains, mux-controls, the HPM and its bus, hotplug and
    power-enable GPIO controllers) is checked whole, then enabled; a route the loader cannot vouch for leaves the
    engine with iBoot.
  • A display DART the subsystem already lists is not appended again.

Engines the tree does not describe for this handoff stay with iBoot: dcpext1..3 (their nodes have other DART
windows) and dcpext5..7 (no node).

27.2 (26B123)

On the 27.2 production stub the J775D's engines run the image the J775c reports there (satchlj's read on #259), not
27.0's, and the first form of this PR took the first 27.2 row with external engines on, so it bailed there. The
image row is now chosen by the OS firmware and the image the ADT reports, as joshuaswarren's #259 does for the panel
path:

Who runs the changed code

  • The new path is chosen by the device tree, not the board name (t6050_headless_engine()): no dcp/disp0
    aliases, and a display subsystem whose single iommus DART is one of the ADT's dart-dispextN. On integration at
    6ae9c3ca only the J775D's tree is like that. The J714c, J716c, J716s, J775c, J873s, K114c, K114s and K116c have no
    aliases either, but the J716c's display subsystem lists five DARTs and the others have no display subsystem, so they
    keep "no handoff". Another panel-less T6050 whose tree describes its display subsystem this way takes the same
    checked path.
  • Every other T6050 board takes the code it took on main, plus one loop: on a panel board, before an external
    engine's display DART is appended to the display subsystem's iommus, that list is read to skip a DART already
    in it. Today's trees never match (the J714s's and K116s's list only <&disp0_dart 0>; the J716c has no
    dcp/disp0 aliases and stops before any handoff), so the append happens as on main. The external-engine
    function also gained the headless branches and its node lookup moved into a helper.
  • On panel boards the row choice is kboot: T6050: hand the internal display off on the 27.3 beta (26C5035r) #259's: a row matches its own firmware and image. The rows they matched before
    are matched the same way; only the refusal for an unknown image reads differently ("OS firmware 27.0 with DCP
    image ... is not a known pair").
  • No other SoC reaches this file's T6050 path.

Validation

  • Rebased onto main at 8fb038f (from 3d517e6: kboot: T6050: hand the M5 Ultra's GPU to Linux instead of refusing its firmware build #261 and pmgr: stop reading die 0's power words for a two-die SoC's die-1 devices #263 are merged, so the branch now carries only its own
    three commits); no conflict, and kboot_display_handoff.c is the same on both bases. A fourth commit chooses the
    panel-less path by the device tree; the first three are unchanged.
  • The fourth commit, against the third, over the trees of the eleven T6050 boards above (the J716s, J873s,
    K114s and K116c added): every scenario of every board other than the J775D gives byte-identical logs and device
    trees (27 scenarios). The J775D's are identical too, but for one: a J775D tree without a display subsystem now logs
    "no handoff" instead of a refusal. A J775D tree with its root compatible renamed gets the same handoff, log and tree
    as the J775D itself.
  • Earlier, on main at 3d517e6 (from 03d120d, sptm_virt: T8142: macOS on all ten cores, and a trace of its sleep and wake #277 among the new commits): the three commits' diffs were unchanged.
  • A host check builds kboot_display_handoff.c from main (03d120d) and from this branch against the device trees
    of the J714s, K116s, J714c, K114c, J716c, J775c and J775D, with a modelled ADT. In all 26 scenarios of the boards
    other than the J775D (handoff, refusals on the wrong firmware or image, a stopped or unpowered engine, a faulting
    read, a missing alias or bandwidth node, no /vram, the display already on, and on the J775c 27.2 with its own
    image or an unknown one) the device trees are byte-identical, and so are the logs but for the reworded refusal in
    the two unknown-image scenarios (J714s, K116s). Against kboot: T6050: hand the internal display off on the 27.3 beta (26C5035r) #259's commit alone, the third commit leaves all 26
    byte-identical, logs included.
  • 15 J775D scenarios: on 27.0, the handoff; on 27.2 with the engines on the J775c's 27.2 image, the same handoff
    with firmware 27.2.0 and that image published to dcpext0 and dcpext4; on 27.2 with an image no row pairs with
    27.2 (the K116s's, or an unknown one) and on 27.0 with an unknown image, a refusal naming firmware and image, with
    no display node changed (only the refused status in /chosen); on 27.2 with dcpext4 on another image than dcpext0, dcpext0 handed off and dcpext4 left with
    iBoot; dcpext0 or dcpext4 stopped, unpowered or faulting; no /vram; no HPM; no bandwidth node; display already on;
    no display subsystem: the handoff completes, or leaves the tree as it was for that engine.
  • The host pytest suite as CI runs it (tests/python and the two T8122 GPU tests): 753 passed, 56 skipped, as on
    main at 8fb038f.
  • RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1 with clang/lld 23.1.4, on main at 8fb038f: builds with main's warnings;
    aura.bin 3997696 bytes, _file_vital_end 0x11b980 as on main; .text content +0x800, .rodata +0x348, .init
    content -0x84 (the row choice moved into the shared helper). clang-format 20.1.8 (CI's) clean.

Hardware

J775D (OS firmware 27.0), integration/aurora at 7c71d6df6563 with M5 Ultra commits on top (among them a
compute-timestamp change that is no longer in this set), with the first commit:

  • The loader hands dcpext0 over with the display subsystem and its Type-C route (8 nodes) and dcpext4 with its HDMI
    route (2 nodes), and leaves dcpext1..3 and 5..7 with iBoot. apple-drm binds both engines at 2.8 s.
  • HDMI comes up at 1920x1080 (13 modes) and a DisplayPort monitor on the USB-C port with 25 modes up to 3840x2160.
  • With the GPU firmware-build PR and the 30-CPU PR as well, the desktop runs on both outputs and the GPU passes its
    compute, chained-submit and 46-client checks with no recovery, fault or timeout.

Again on main at eb66d6c with the first commit and the other aura pull requests below, booting integration/aurora at
fc050503ffcd with only the linux pull requests below, one boot: apple-drm binds both engines, the desktop runs on
the GPU on HDMI and DisplayPort at 1920x1080, and the GPU passes its compute, chained-submit and 46-client checks
and a 628-case render CTS subset (571 pass, 57 not supported), with no recovery, fault or timeout.

With all three commits: main at 03d120d with this branch's commits and the other aura pull requests below (the same
files as this branch), booting integration/aurora at 1f38ff8f4dc9 with the linux pull request below and sithglan's
27.2 display-readiness commit (merged since, in #2063):

  • 27.0 stub, one boot: the same handoff lines as with the first commit alone (firmware 27.0); the desktop runs on
    the GPU on HDMI and DisplayPort at 1920x1080@60, and the GPU passes its compute, chained-submit, timestamp and
    46-client checks and the 628-case subset (571 pass, 57 not supported, two runs), with no recovery, fault or timeout.
  • 27.2 stub (26B123), with the first three commits, one boot: the loader hands dcpext0 over with the display subsystem (firmware 27.2) and its
    Type-C route (8 nodes) and dcpext4 with its HDMI route (2 nodes), and leaves dcpext1..3 and 5..7 with iBoot.
    apple-drm binds both engines, both DCPs boot with no crash or recovery, and HDMI comes up at 1920x1080@60. Only
    HDMI was tested on 27.2: no DisplayPort monitor was connected for these boots. A second 27.2 boot, with the GPU
    running as well (see kboot: T6050: hand the M5 Ultra's GPU to Linux instead of refusing its firmware build #261), handed both engines over the same way and ran the desktop on HDMI at 1920x1080@60.

With the fourth commit: main at 8fb038f with this branch and #262, booting integration/aurora with #1173's 27.2 GPU
support, a G17D build entry (see #261) and the linux pull request below, through the 27.2 stub, one boot: the loader's display handoff lines
are the same as with the first three commits (dcpext0 with the display subsystem, firmware 27.2, and its Type-C route
of 8 nodes; dcpext4 with its HDMI route of 2 nodes; dcpext1..3 and 5..7 left with iBoot). apple-drm binds both
engines, both DCPs boot with no crash or recovery, HDMI comes up at 1920x1080@60, and the desktop runs on the GPU.

Part of the M5 Ultra platform pack

Each pull request below stands on its own; together they bring the Mac Studio (M5 Ultra, J775D) up from public
branches to the desktop.

@RyanTheTide

Copy link
Copy Markdown
Contributor

The production boot stub pins at macOS 27.2 (26B123), so please retarget this to 27.2. On your question: yes, please add the J775D 27.2 row and test the handoff on the 27.2 stub.

@funkzy

funkzy commented Nov 18, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Retargeted to 27.2 (26B123) and tested on the 27.2 stub:

Rebased onto main at 3d517e6; the description has the details.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for giving the M5 Ultra Mac Studio its displays; the route checks are thorough.

One selection doesn't fit how we usually do this. Headless mode is chosen by the root compatible (src/kboot_display_handoff.c:3917-3919 t6050_headless() returns true only for apple,j775d, used at :4036). We select behaviour by a hardware property rather than by the board it was tested on.

Your description already gives the property: the tree has no dcp/disp0 aliases (no panel) and /display-subsystem scans out through one dispext DART. Could t6050_headless() test exactly that? Then any panel-less T6050 machine (a Mac Studio M5 Max, a future mini) takes the same checked path without another list entry.

We can't boot a T6050 desktop ourselves, but happy to help line up owner rows.

funkzy and others added 4 commits November 19, 2026 11:20
The Mac Studio (M5 Ultra, J775D) has no internal panel, so its device
tree has no dcp/disp0 aliases and the T6050 handoff stops at "the
device tree does not describe the internal display: no handoff". Its
display subsystem then never binds, and Linux has no display.

The J775D tree instead describes its output engines and leaves them
for the loader: /display-subsystem disabled with
iommus = <&dart_dispext0 0>, dcpext0 (USB-C, die 0) and dcpext4
(HDMI, die 1) each with its DARTs, mailbox and a disabled pmc-metadata
node its own apple,bw-scratch names, and the chain each output needs
(dcpext0's Type-C PHY, its mux and the HPM; dcpext4's DP PHY and the
GPIO controllers of its hotplug and power enables) also disabled.

On a board whose root is "apple,j775d", hand those over through the
external-engine checks dj added (56e6d95, 5bcf3cb, 12a1bde,
2ee6d88), plus:
- the engine the display subsystem scans out through (the one its
  single iommus DART belongs to, by the ADT's dart-dispextN) goes
  first, in one transaction with the subsystem: the boot framebuffer
  must lie in /vram, which is reserved no-map as framebuffer@ and
  becomes the memory-region of that engine and of the subsystem, as
  the panel path does with it (dj, faa355c);
- the tree's apple,bw-scratch is kept when its PMC node's reg is the
  engine's ADT bandwidth block and the offset lies inside it, and that
  node is enabled;
- each engine's route (phys with their mailboxes and power domains,
  mux-controls, the HPM and its bus, hotplug and power-enable GPIO
  controllers) is checked whole, then enabled, so a route the loader
  cannot vouch for leaves the engine with iBoot;
- a display DART the subsystem already lists is not appended again.
Engines the tree does not describe for this handoff stay with iBoot
as before: dcpext1..3 (their nodes have other DART windows) and
dcpext5..7 (no node). Boards with an internal panel take the
existing path; of the new code they run only the check for a display
DART already listed, which finds none in their trees.

Needs the previous commit, so that dcpext4's power check reads its own
die.

Tested on the J775D (OS firmware 27.0) with integration's kernel:
the loader hands dcpext0 over with the display subsystem and its
Type-C route (8 nodes) and dcpext4 with its HDMI route (2 nodes), and
leaves dcpext1..3 with iBoot. apple-drm binds both engines at 2.8 s;
HDMI comes up at 1920x1080 and a DisplayPort monitor on the USB-C port
with its 25 modes up to 3840x2160. With the GPU firmware-build change
as well, the desktop runs on both outputs.

A host check that builds kboot_display_handoff.c before and after this
commit against the device trees of the J714s, K116s, J714c, K114c,
J716c and J775c gives byte-identical logs and trees in all 23 of their
scenarios.

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
…775c

On 27.2 the DCP image id is not shared across T6050 boards: the K116s keeps
its row, and the J775c (Mac Studio M5 Max) reports its own image, measured
on that machine. The table therefore pairs each row with the image the ADT
reports: a row matches only its own firmware and image, so an unknown pair
bails with both named instead of the first firmware match winning.

Proved by: the kboot build at this head.

Signed-off-by: Joshua Warren <816217+joshuaswarren@users.noreply.github.com>
[jq: from aurora-silicon#259 (5c21c07), without the two 27.3 beta
 commits it sits on there: the rows carry no dt_fw column and there is no
 27.3 beta row; the code and the J775c row are unchanged]
Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
…tub too, where the handoff bailed

On 27.2 (26B123) the J775D's dcpext engines run the image the J775c's
DCP runs there (aura#259's J775c row), not 27.0's. The panel-less
handoff took the first 27.2 row with external engines on, whatever
image the engine ran, so the pinned image was not checked against the
image the engine reports, and on a table without that row it bailed
with "OS firmware 27.2 has no external engine image": the J775D booted
without a display subsystem.

Pick the row the way aura#259 (joshuaswarren, 5c21c07) taught the
panel path to: by the OS firmware and the image the ADT reports, here
the image of the engine the display subsystem scans out through. Both
paths now share one helper, t6050_pick_image(), so the two cannot pick
differently again. A row must also hand off external engines; every
other engine handed off must run the same image, as before. An unknown
pair is refused with both named.

The J775c's 27.2 row covers the J775D: its engines report that image
(read from the J775D's 27.2 ADT; satchlj read the J775c's). Boards with
a panel pick the same row as with aura#259's change alone.

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
…e tree describes, not by the J775D's name, so another panel-less T6050 takes it too

The panel-less handoff ran on a board whose root compatible is
"apple,j775d". Choose it by the property that makes the path work
instead: the tree has no dcp/disp0 aliases (checked already) and its
display subsystem's single iommus DART is one of the ADT's
dart-dispextN. t6050_headless_engine() makes that check, which
t6050_headless_check() made after the choice until now, and returns
the scanout engine. A panel-less T6050 whose tree describes its
display subsystem this way takes the same checked path.

Of today's trees only the J775D's does. The other boards without the
aliases (J714c, J716c, J716s, J775c, J873s, K114c, K114s, K116c) have
no display subsystem, or one with several DARTs (J716c), and keep
"the device tree does not describe the internal display: no handoff".
A J775D tree without a display subsystem now logs that line too,
instead of a refusal.

A host check that builds kboot_display_handoff.c before and after this
commit against the device trees of those boards, the J714s, K116s and
the J775D gives byte-identical logs and trees in all 27 scenarios of
the other boards and in 12 of the J775D's 13; the 13th is the tree
without a display subsystem. A J775D tree with its root compatible
renamed gets the J775D's handoff, log and tree.

Tested on the J775D through the 27.2 stub: the loader hands dcpext0
over with the display subsystem and its Type-C route and dcpext4 with
its HDMI route, with the same lines as before this commit; apple-drm
binds both engines and HDMI comes up at 1920x1080@60.

Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
@funkzy

funkzy commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks, done, in a fourth commit. The board name check is gone. The panel-less path is now taken when the tree has no dcp/disp0 aliases and /display-subsystem's single iommus DART is one of the ADT's dart-dispextN (t6050_headless_engine(), the check t6050_headless_check() already made, now done first). A panel-less T6050 whose tree describes its display subsystem this way takes the same checked path.

On integration at 6ae9c3ca, only the J775D's tree matches. The J714c, J716c, J716s, J775c, J873s, K114c, K114s and K116c have no aliases either, but the J716c's display subsystem lists five DARTs and the others have no display subsystem, so they keep "no handoff".

Host check, previous revision against this one, over the trees of all eleven T6050 boards: every other board is byte-identical in all 27 scenarios, logs included. On the J775D:

  • every scenario is identical but one: a J775D tree without a display subsystem now logs "no handoff" instead of a refusal;
  • a J775D tree with its root compatible renamed gets the same handoff as the J775D itself.

On the J775D through the 27.2 stub, one boot: the loader's handoff lines are the same as before. apple-drm binds both engines, and HDMI comes up at 1920x1080@60.

Rebased onto main at 8fb038f. With #261 and #263 merged, the branch now carries only its own commits, and the first three are unchanged.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for 0d80d3a. Choosing the panel-less handoff by what the tree describes (no dcp/disp0 aliases, and the display subsystem's single DART being one of the ADT's dart-dispextN) is exactly the hardware key we hoped for, and the eleven-board host comparison plus the J775D boot make the effect easy to trust. Once the queued checks finish this is ready for the next step.

@RyanTheTide

Copy link
Copy Markdown
Contributor

For the record: #259 is closed in favour of this PR. At 0d80d3a this one carries everything #259 had that isn't 27.3-specific: the image lookup that pairs firmware with the ADT uuid, and the J775c 27.2 row C51FB0C8-.... The K114c 27.2 image row can follow as its own small PR once a K114c boots 27.2.

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.

3 participants