Repository navigation
Conversation
|
Review at b01c5de (non-author, draft). One question on the takeover; otherwise no blocker beyond the booted row.
Question (takeover, first patch): the comment says it takes a pipeline "from a direct DP-alt port whose sink never did" assert HPD, but the check is the port's current state ( Small points, not blocking:
Assisted-by: LLM (Claude:Opus 5.5) |
|
To address @RyanTheTide's review point about a sleeping monitor losing its pipeline on a second plug: I ported the idle-port reclaim patch onto 7.3 If useful, feel free to cherry-pick or fold in commit |
|
The check is the port's current state, so with every pipeline in use a monitor in standby would lose its pipeline to a newly plugged display. That is not what the comment says and not what I meant. With the second patch a port only gets a pipeline once its sink has asserted HPD, so as far as I can read it the only ports left for the takeover on this machine are the ones that had HPD and dropped it, which is exactly the case it should leave alone. That makes the choice either to drop the first patch or to keep it with a latched flag, the way @ericjuta did in 1a7c5aa (thanks for porting that with the latch!). Before I update the branch I'll check on the J314s whether anything is still routed without HPD at boot with the second patch alone, and run a replug row with one monitor in standby. That needs the laptop back at the desk with both monitors. The sign-off will be on the commits before this leaves draft. |
b01c5de to
9da4ccf
Compare
|
Thanks. Either outcome works for me: if the second patch alone leaves nothing routed without HPD at boot on the J314s, dropping the first one is the simpler result, and One limit on my side: |
9da4ccf to
fa8034a
Compare
|
I dropped the first patch, so the branch is now the second one alone, with the sentence about the hand-over taken out of its message. Tested on the J314s with a test kernel built from the integration tip of the 22nd with this patch and without the takeover, two monitors over USB-C, one of them behind a USB-C KVM dock:
A port with HPD that finds every pipeline driving another display now waits, as it did before this PR. I could not set up that case here, it needs three displays. @ericjuta, thanks for the latched version. With the takeover gone it isn't needed for this PR, but it would be the way to do it if the takeover comes back. The sign-off will be back on the new commit shortly. |
2912162 to
edb4a5d
Compare
|
Baseline from a J415 (MacBook Air 15" M2, T8112) for the case this PR targets. This is without the PR: packaged Setup: an Anker USB-C hub with DP alt mode and no display attached, plugged in first. An Apple Studio Display (Thunderbolt) plugged into the other port 16 s later. Result: the hub works (USB 2 and USB 3 trees, Ethernet, HID). The idle hub takes the external pipeline, and the Studio Display stays dark. The other order works on the same boot: display first, then the hub, gives a 5120x2880@60 picture and working hub USB, with no Not tested: whether the display lights up when the hub is unplugged afterwards, and this PR's head. I can re-test on this Mac when a build with it reaches the Omarchy rc channel. |
|
@sschuez, thanks for the baseline. That is exactly the case this PR is about, and I had only seen it on the J314s. Your log also shows that my Risk line is wrong. It says T600x only, but the change is in the common Type-C routing path ( From reading the code, with this PR your hub should stay unrouted until a display behind it asserts HPD, and the Studio Display's tunnel picks from the same pipelines, so it should find one free. I have only run it on the J314s, so none of this is tested on your Air yet. If a build with it reaches the rc channel, your same two orders would be the row it is missing on a second chip, and an unplug of the hub afterwards would be a good third. |
|
@ericjuta, I never answered your offer of a single-monitor replug and lid row on your J615, sorry. If it still stands, it would help now. Reading main again, the change is not limited to T600x after all, and a row on a Mac other than my J314s is what it lacks. The head is still The most useful row with one monitor: a hub or dock in DP alt mode with no display behind it plugged in first and the monitor second, then a replug of the monitor, and a lid close and open with the monitor on. A pass would be the monitor lit each time, and no |
|
Thanks. I'll run both orders and then a hub unplug once a build with this reaches the rc channel, and post the results here. |
Outside compositor pairing order, a direct DP-alt port with no pipeline takes the lowest free one as soon as it enters DP mode, whether or not a display is behind it; only Desktop 26.x, T6041 and T8142 wait for HPD. A USB-C dock without a monitor that enters DP mode before the port of a USB-C display takes the pipeline that display needs, and the display then waits for as long as the dock stays plugged in. Which port enters DP mode first changes from boot to boot. At a wake the port controller applies each port's state again, and the dock's port then takes a pipeline an HDMI display left free. Leave a port that owns no pipeline and has no HPD unrouted on every machine, as those three already do. The port controller reports HPD as a new status when a display appears, and the port is routed then. A port that owns a pipeline behaves as before on an HPD drop, and the compositor-ordered path is unchanged. Signed-off-by: Andreas Fernandez <andreas.fernandez@hotmail.com>
edb4a5d to
861ff55
Compare
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
There was a problem hiding this comment.
Verdict: MERGE at 861ff55
Checked: An unowned direct DP-alt port with HPD low now exits without picking a pipeline. The cached status includes HPD, so a later assertion applies a fresh update. The existing HPD-drop path for an owned port, tunnel handling, and compositor ordering are preserved.
Checked: The exact routing block passed 25 local cases across the legacy and previously gated paths. They covered an empty dock with and without a free pipe, later HPD, an existing owner, ordered routing, and activation failure retry. Both legacy baseline controls reproduced the earlier behavior. The author reports three fresh J314s boots with the PR in the tested stack and 16 more in the deep-sleep series.
What: A port in DP alt mode takes a display pipeline as soon as it enters DP mode, even with nothing asserting HPD behind it, so a USB-C dock without a display takes a pipeline and a USB-C display then waits for as long as the dock stays plugged in. Which port enters DP mode first changes from boot to boot, and at a wake the port controller applies each port's state again, so the dock's port can also take a pipeline an HDMI display left free. Main now leaves such a port unrouted only on Desktop 26.x, T6041 and T8142; this makes that the rule on every machine. A port that owns a pipeline behaves as before on an HPD drop, so a display in standby keeps its pipeline, and the compositor-ordered path is unchanged.
Tested: J314s M1 Pro, main 24970e1 with this PR and three other small PRs (#4237, #4235, #4236) at 0a274fa, an empty USB-C dock (nothing behind it), an ASUS ROG monitor on USB-C and a VG278 on HDMI: 3 fresh boots, the dock's port took no pipeline in any (0 "waits for a free external display pipeline"), all three displays connected, 0 kernel warnings. On the T6000 deep sleep series, which carries this commit unchanged: 16 fresh boots with the same setup, the USB-C monitor on its pipeline and the dock's port unrouted in every one; HDMI pulled while awake, a deep sleep, HDMI plugged in after the wake: the dock's port took no pipeline and the HDMI display came up. The same series without this commit: at boot the empty dock's port got the Type-C pipeline and the USB-C monitor waited for the whole boot ("display on USB-C Left Front waits for a free external display pipeline").
Risk: Two-way door. Every Mac whose Type-C ports route DP alt mode through
dcp_typec_route_apply(); for Desktop 26.x, T6041 and T8142 nothing changes. Run only on the J314s (T6000); a T8112 baseline in the comments shows the unpatched behaviour there too.Not yet: Rows on other Macs (the J415 and J615 offers in the comments). The earlier "USB-C display stays dark after s2idle" item here was dcpext1 losing its power in s2idle, which is its own fix now: #4237 (for #3718).
Details
The same thing happens at boot, when the PD controllers report a DP state for ports with nothing behind them, which is how the LUKS prompt ends up on the internal panel of a closed laptop (omarchy-pkgs#1037). I wrote here before that other processors already keep such a port unrouted. That was wrong at least for the T8112 (see the baseline in the comments), and the change is in the common routing path.
An earlier version also let a port with HPD take over the pipeline of a port without it. As the review pointed out, that would also take the pipeline of a display in standby, so it is gone. The tipd -ENOSPC patch from the old pull request is already fixed here by 219a271 and 27285e5.
Moved from omacom/linux-aurora#186.
Evidence
At 861ff55 (rebased onto main 24970e1; main had gained the same rule for three machines, so the change is now the dropped gate): build (LLVM=1, W=1, arm64)
drivers/gpu/drm/apple/dcp-fabric.orc=0, 0 warnings; checkpatch --strict 0 errors, 0 warnings, 0 checks.Earlier version of this PR (edb4a5d):
verify/pd-disc.sh 0x3f 4), three times, 16 s apart. Each time DP-2 came back at 2560x1440@200 10 bit,tps6598x/typecerror lines 0, kernel WARNING splats 0.dcp_dptx_connect: failed to validate DPTX target 0:1: -110x6,Type-C DPTX reconnect failed after 6 retries, and on the next disconnecttps6598x 0-003f: cable revalidation failed after 3 attempts. The HDMI display came back.Happy to run anything else on the J314s.