Repository navigation
pmgr: stop reading die 0's power words for a two-die SoC's die-1 devices - #263
Merged
Merged
Conversation
This was referenced Nov 15, 2026
pmgr_adt_collect_psregs() lists the PS registers of a node's clock gates and their parents, but computed every address on die 0. On a two-die SoC a die-1 device's list therefore named its die-0 twin's words, so a caller checking that the device is powered read the wrong die's state. pmgr's own power-on path already keeps the die of each gate and passes it to the parents (pmgr_set_mode_recursive()). Do the same here: keep each gate's die from the ADT entry, pass it on to the parents, and compute the address on that die. A die-0 entry carries die 0, so single-die SoCs and die-0 devices get the same list as before. Checked on the host against the Mac Studio's (M5 Ultra, J775D) PMGR tables: all 78 die-0 nodes collect the same words as before; the 43 die-1 nodes now get die-1 addresses (0x42806002a8 for dp-audio7's gate, where it read 0x2806002a8 before). Signed-off-by: Jeff Queisser <funkzy@users.noreply.github.com>
funkzy
force-pushed
the
t6050-pmgr-die1
branch
from
November 18, 2026 04:44
c40d778 to
3bc909a
Compare
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.
What is wrong
pmgr_adt_collect_psregs()lists the PS registers of a node's clock gates and their parents, for callers that mustcheck or keep a device powered. It reads each gate's device id from the ADT but computes every address on die 0
(
pmgr_device_get_addr(0, ...)), and pushes the parents without a die. On a two-die SoC a die-1 device's listtherefore names its die-0 twin's words: on the Mac Studio (M5 Ultra, J775D), the second die's HDMI engine dcpext4
gets dcpext0's power words, so a "powered" check of dcpext4 reads dcpext0's state.
pmgr's own power-on path already keeps the die:
pmgr_set_mode_recursive()takes it from the ADT entry and passes itto each parent. dj's 6001516 shared this collector with the display handoff, and his a9d3512 wrote it for
the SPTM-virt sleep path; c498a75 (dj's #178) gave pmgr the T6050 die stride.
What this changes
The stack keeps each entry's die and device id as the ADT has them; the address is computed on that die, and each
parent is pushed with its child's die. The function's comment says per die. A die-0 entry carries die 0, so its list
is what it was.
Who runs the changed code
Two callers on main:
kboot_display_handoff.c,t6050_ext_one()): the power check of each externalengine. On main it runs on the T6050 boards with an internal panel (J714s, J714c, K116s, K114c, J716c) for
dcpext0..3, all on die 0 of a one-die SoC: their lists do not change. The J775D display PR is the first caller
with a die-1 device (dcpext4).
sptm_virt_s2r.c,s2r_keep_setup(),SPTM_VIRT=1builds only): the controller,DART and PHY of each USB port it keeps powered for the guest. On a one-die SoC (the J700's T8140, the J616s's T6041)
nothing changes; on a two-die SoC a port on die 1 now keeps its own die's domains.
The result changes only for an ADT gate entry with a non-zero die, which only a two-die SoC (an Ultra: the T6002,
the T6022, the M5 Ultra) has.
Validation
struct pmgr_deviceand the collector with its helpers, from main andfrom this branch, and runs both over every node with clock gates in the J775D's ADT PMGR tables: all 78 nodes whose
gates are on die 0 collect the same words; the 43 die-1 nodes now get die-1 addresses (
/arm-io/dp-audio7:0x42806002a8, 0x4280600220, 0x42806001e8, where main gave 0x2806002a8, 0x280600220, 0x2806001e8).
branch.
RELEASE=1 CHAINLOADING=1 ESP_STAGE2=1with clang/lld: builds with main's warnings;aura.bin3997696 bytes,_file_vital_end0x11b6c8 as on main;pmgr_adt_collect_psregs492 to 516 bytes. clang-format clean.unchanged and
pmgr.cis the same on both bases. There it builds with main's warnings,aura.bin3997696 bytesand
_file_vital_end0x11b890 as on main, and the host pytest suite as CI runs it gives 750 passed, 56 skipped, as on main.Hardware
request (and a compute-timestamp change that is no longer in this set): dcpext4's power check passes on its own
die's words and the HDMI engine is handed over; the desktop comes up with HDMI and DisplayPort.
fc050503ffcd with only the linux pull requests below, one boot: the desktop runs on the GPU on HDMI and
DisplayPort, both at 1920x1080.
integration/aurora at 1f38ff8f4dc9 with the linux pull request below: on the 27.0 stub the desktop runs on the GPU
on HDMI and DisplayPort at 1920x1080@60; on the 27.2 stub (26B123) dcpext4's power check passes on its own die's
words, the HDMI engine is handed over and HDMI comes up at 1920x1080@60 (no DisplayPort monitor was connected
for that boot).
die is 0); a boot on a J714s with an external display would confirm the handoff's checks there.
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.