Repository navigation
Conversation
|
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. |
6699fe9 to
559ebd7
Compare
|
Thanks. Retargeted to 27.2 (26B123) and tested on the 27.2 stub:
Rebased onto main at 3d517e6; the description has the details. |
|
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 ( Your description already gives the property: the tree has no We can't boot a T6050 desktop ourselves, but happy to help line up owner rows. |
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>
559ebd7 to
0d80d3a
Compare
|
Thanks, done, in a fourth commit. The board name check is gone. The panel-less path is now taken when the tree has no 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:
On the J775D through the 27.2 stub, one boot: the loader's handoff lines are the same as before. Rebased onto main at 8fb038f. With #261 and #263 merged, the branch now carries only its own commits, and the first three are unchanged. |
|
Thanks for 0d80d3a. Choosing the panel-less handoff by what the tree describes (no |
|
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 |
What is missing
The Mac Studio (M5 Ultra, J775D) has no internal panel, so its device tree has no
dcp/disp0aliases, and theT6050 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-subsystemis disabled withiommus = <&dart_dispext0 0>. dcpext0 (USB-C, die 0) and dcpext4 (HDMI,die 1) are disabled, each with its DARTs, mailbox and a disabled
pmc-metadatanode that its ownapple,bw-scratchnames. Each output's chain is disabled too: dcpext0's Type-C PHY with its mailbox and powerdomains, 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/disp0aliases and whose display subsystem scans out through oneexternal 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:
iommusDART belongs to, by the ADT'sdart-dispextN) goes first, in one transaction with the subsystem. The boot framebuffer must lie in/vram, whichis reserved no-map as
framebuffer@and becomes thememory-regionof that engine and of the subsystem, as thepanel path does (dj's faa355c).
apple,bw-scratchis kept when its PMC node'sregis the engine's ADT bandwidth block (dispextNreg[4]) and the offset lies inside it; that node is enabled.
mux-controls, the HPM and its bus, hotplug andpower-enable GPIO controllers) is checked whole, then enabled; a route the loader cannot vouch for leaves the
engine with iBoot.
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:
joshuaswarren's authorship, without the two 27.3 beta commits it sits on there: no
dt_fwcolumn and no 27.3 betarow; its code and its J775c 27.2 row are unchanged. joshuaswarren's draft kboot: T6050: 27.2 variant of the display handoff series (27.3 rows dropped) #297 (kboot: T6050: hand the internal display off on the 27.3 beta (26C5035r) #259's 27.2 variant) carries the
same commit with the
dt_fwcolumn; if kboot: T6050: hand the internal display off on the 27.3 beta (26C5035r) #259 or kboot: T6050: 27.2 variant of the display handoff series (27.3 rows dropped) #297 lands first, this commit gives way to theirs on a rebase.engine the display subsystem scans out through, through one helper the panel path now shares, so the two paths
cannot pick differently. The row must hand off external engines; every other engine handed off must run the same
image, as before. An unknown pair is refused with both named. kboot: T6050: hand the internal display off on the 27.3 beta (26C5035r) #259's J775c row covers the J775D: its dcpext0..7
report that image on 27.2 (read from the J775D's 27.2 ADT).
Who runs the changed code
t6050_headless_engine()): nodcp/disp0aliases, and a display subsystem whose single
iommusDART is one of the ADT'sdart-dispextN. On integration at6ae9c3ca 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.
engine's display DART is appended to the display subsystem's
iommus, that list is read to skip a DART alreadyin it. Today's trees never match (the J714s's and K116s's list only
<&disp0_dart 0>; the J716c has nodcp/disp0aliases and stops before any handoff), so the append happens as on main. The external-enginefunction also gained the headless branches and its node lookup moved into a helper.
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").
Validation
three commits); no conflict, and
kboot_display_handoff.cis the same on both bases. A fourth commit chooses thepanel-less path by the device tree; the first three are unchanged.
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.
kboot_display_handoff.cfrom main (03d120d) and from this branch against the device treesof 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 ownimage 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.
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
refusedstatus in/chosen); on 27.2 with dcpext4 on another image than dcpext0, dcpext0 handed off and dcpext4 left withiBoot; 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.
tests/pythonand the two T8122 GPU tests): 753 passed, 56 skipped, as onmain at 8fb038f.
RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1with clang/lld 23.1.4, on main at 8fb038f: builds with main's warnings;aura.bin3997696 bytes,_file_vital_end0x11b980 as on main;.textcontent +0x800,.rodata+0x348,.initcontent -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:
route (2 nodes), and leaves dcpext1..3 and 5..7 with iBoot.
apple-drmbinds both engines at 2.8 s.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-drmbinds both engines, the desktop runs onthe 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):
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.
Type-C route (8 nodes) and dcpext4 with its HDMI route (2 nodes), and leaves dcpext1..3 and 5..7 with iBoot.
apple-drmbinds both engines, both DCPs boot with no crash or recovery, and HDMI comes up at 1920x1080@60. OnlyHDMI 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-drmbinds bothengines, 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.