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. |
1a37019 to
2912162
Compare
Outside compositor pairing order, a direct DP-alt port takes the lowest free pipeline as soon as it enters DP mode, whether or not a display is behind it. A USB-C dock without a display does exactly that, and on an M1 Pro with two pipelines it leaves one display dark when it is plugged in before them. Leave a port that owns no pipeline and has no HPD unrouted, and route it when the port controller reports HPD as a new status. A port that already owns a pipeline keeps it across an HPD drop, as before, so a display in standby keeps its pipeline. The compositor-ordered path is unchanged. Link: omacom/omarchy-pkgs#1037 Signed-off-by: Andreas Fernandez <[email protected]>
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. |
What: On T600x 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 one of two USB-C displays stays dark. This keeps a port that owns no pipeline unrouted until its sink asserts HPD; a port that already owns one keeps it across an HPD drop, so a display in standby keeps its pipeline.
Tested: J314s M1 Pro at edb4a5d (candidate 2596602bfaf6 on main 972a566, plus a test-only commit for the HDMI rows): boots, the same failed units as plain main, USB-C display back after each of three port disconnects with 0 Type-C errors and 0 kernel warnings.
Risk: two-way door · T600x Macs (M1 Pro, Max, Ultra); other SoCs already behave this way and are not touched.
Not yet: the USB-C display after s2idle. On the candidate the display on this port stays dark after the wake (
failed to validate DPTX target 0:1: -110, five tries), and replugging the port does not bring it back. I saw the same on this port after s2idle in October on older 7.2 kernels, and keeping all four ATC PHY power domains on through the sleep did not change it, so I don't think this commit causes it; plain main has not been through the same sequence with #3639's fix yet. After a deep sleep it came back (one run). A dock and two USB-C displays on this base.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). As far as I can read the tree, a port without HPD is already kept unrouted on the desktop 26.x, T6041 and T8142 processors, and in compositor pairing order on T6030 and T6050, but not on T600x.
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
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.