Repository navigation
Conversation
…rough sleep On T600x with APPLE_USE_PMP the display processors take their power domain from pmp-report entries instead of PMGR domains. dcp_platform_suspend() sets the wakeup path on the processor, "which forces its power domains to stay on", because the DCP firmware is not shut down for sleep and cannot be restarted. The PMGR domains honour that: apple_pmgr_ps_probe() gives every domain that is on at boot GENPD_FLAG_ACTIVE_WAKEUP. A pmp-report entry gets the flag only when it is apple,always-on. pmp-dispext1 is not. For a plain entry genpd withdraws the request at suspend_noirq, the PMP drops the external display block, and the entry is asserted again at resume with dcpext1's firmware gone. The first DPTX call on it after the resume times out, and a display routed through it stays dark until reboot: apple-dcp 28cc00000.dcp: AFK[ep:2a]: AppleDCPDPTXRemotePort (chan:1) command type 0xc0 tag 0x0000 timed out after 1000 ms apple-dcp 28cc00000.dcp: dcp_dptx_connect: failed to validate DPTX target 0:1: -110 apple-dcp 28cc00000.dcp: Type-C DPTX reconnect failed after 5 retries: -110 thunderbolt-apple-acio b01ac0000.cio: dpin0: DP tunnel setup failed: -110 followed by tb_dp_wait_dprx "DPRX read timeout" a dozen times a second for as long as the display is plugged in. pmp-dispext0 is always-on, so the HDMI port and a display routed through dcpext0 do not show it; a Thunderbolt DP tunnel is routed through dcpext1 here. Give every entry GENPD_FLAG_ACTIVE_WAKEUP. It only holds a request while a consumer is in the wakeup path, which the display processors are. An always-on entry still seeds its request at probe, and an apple,release-for-sleep entry still withdraws its request explicitly in its own noirq callbacks. dispext1 stays powered through suspend-to-idle, as it does without PMP and as dispext0 already does; the saving returns once the T600x processor can be restarted after sleep. The host graph test gets a case with an entry that is not always-on: it is not seeded and it carries the flag, and the mutation that drops the flag fails it. Seen on a MacBook Pro 14" M1 Max (j314c) with PMP enabled and a Studio Display XDR plugged in after a resume from suspend-to-idle: two of two plugs after a resume failed this way, and the same kernel without PMP connected the display after three and after five sleep cycles. With the change, on the same machine and PMP configuration, the display plugged in one second after a resume from a three-minute suspend-to-idle connects through dcpext1 as before the sleep: validate, connect and link training on 28cc00000.dcp complete, both tiles come up at 5120x2880@60. Fixes: 96151d9 ("pmdomain: apple: Add PMP reporting interface") Co-Authored-By: Claude Fable 5.1 <[email protected]> Signed-off-by: Brian Toll <[email protected]>
2 tasks done
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.
Problem
With
APPLE_USE_PMPon T600x (t6000-j314stoday) the display processors take their power domain frompmp-reportentries instead of PMGR domains.dcp_platform_suspend()callsdevice_set_wakeup_path()on every DCP ("which forces its power domains to stay on") because the DCP firmware is not shut down for sleep and cannot be restarted. PMGR honours that:apple_pmgr_ps_probe()gives every domain that is on at bootGENPD_FLAG_ACTIVE_WAKEUP. Apmp-reportentry only gets the flag when it isapple,always-on.pmp-dispext1(report@e) is not always-on;pmp-disp0andpmp-dispext0are. So atsuspend_noirqgenpd withdraws dcpext1's request, the PMP drops the external display block, and the entry is asserted again at resume with the coprocessor's firmware gone. The first DPTX call on it after the resume times out and a display routed through dcpext1 stays dark until reboot:followed by
tb_dp_wait_dprx: ... DPRX read timeoutabout a dozen times a second for as long as the display is plugged in. The Thunderbolt side is healthy (device authorized at 40 Gb/s, tunnel paths activate); the external DCP never answers again, and it logs nothing from its RTKit after the resume. A Thunderbolt DP tunnel is routed through dcpext1 here, so a Studio Display XDR plugged in after a sleep hits it every time. The HDMI port and anything on dcpext0 are unaffected because that entry is always-on.Change
Give every
pmp-reportentryGENPD_FLAG_ACTIVE_WAKEUP. The flag only holds a request while a consumer is in the wakeup path, which the display processors are; an always-on entry still seeds its request at probe, and anapple,release-for-sleepentry (T6030, b28cb3a) still withdraws its request explicitly in its own noirq callbacks, so nothing changes there. dispext1 stays powered through suspend-to-idle, as it does without PMP (PMGR path) and as dispext0 already does; that saving comes back once the T600x external processor can be restarted after sleep.The host graph test (
tools/asahi/t6030-pmp-graph-tests.py) gets a case with an entry that is not always-on: it is not seeded and it carries the flag. The new mutationwakeup-path-droppedfails that case; the full--mutationsrun passes (22 cases), and the new case fails against the unfixed source (--ref integration/aurora).Evidence
MacBook Pro 14" M1 Max (j314c),
integration/aurorac46d7dc with a localAPPLE_USE_PMPdefine for j314c, Studio Display XDR over a Thunderbolt DP tunnel on the left-front port:Live genpd summary with PMP on and nothing attached:
pmp-disp0,pmp-dispext0,pmp-dispext1on; dcpext1 has no runtime PM, so only system sleep ever takes its request away.Tested
Same machine, PMP on (
PMP manages fabric and DCS p-states), kernel = integration/aurora c46d7dc + this change, 2026-11-06 22:12: XDR unplugged, suspend-to-idle 22:09:13 to 22:12:08, display plugged in one second after the resume. It connects through dcpext1 exactly as before the sleep:28cc00000.dcp: dcp_dptx_connect_session(port=0)passes validate and connect,dpin0/dpin1: DP tunnel up, both tiles at 5120x2880@60, no-110anywhere in the log. The unfixed kernel failed on the first DPTX call within a second of the same plug.Host test:
tools/asahi/t6030-pmp-graph-tests.py --mutationspasses (22 cases);--ref integration/aurora(unfixed driver, new test) fails on the new assertion.🤖 Generated with Claude Code