Repository navigation
drm/apple: keep a Type-C display connected while its CRTC is off - #44
Merged
DjDeveloperr merged 1 commit intoSep 27, 2026
Merged
Conversation
Powering a Type-C CRTC off drops DCP's synthetic HPD, and the firmware answers with a hotplug_gated(0) that dcpep_cb_hotplug() passes on as an unplug. dcp_poweroff() then recreates the DPTX session a second later and the firmware reports the display back. Userspace sees the connector go away and return, and compositors enable a display that appears, so DPMS off on a Type-C display is undone about 1.3 s later. Each blank also moves the display's workspaces and focus to another output and back. Ignore that unplug while the CRTC is off and the Type-C mux still reports the cable, as is already done for the unplug integrated panels report after SetPowerState(). Cable removal reaches DRM through dcp_dptx_disconnect_oob() regardless. Drop the reconnect from dcp_poweroff(): with the connector still connected, userspace enables the CRTC again and dcp_poweron() re-establishes the DPTX session synchronously, as it already does. Fixes: 5c29016 ("drm: apple: recover Type-C displays across link interruptions") Signed-off-by: Marcelo Alcantara <[email protected]>
cb2206
added a commit
to cb2206/linux
that referenced
this pull request
Oct 9, 2026
…d sink The previous change puts every second DP IN of a port on DPTX port 1 of the first one's pipeline. Two separate monitors behind a dock must keep their own pipelines instead. DCP tells the host the sink's tile topology through the DPTX SetTiledDisplayHints call, which the driver acknowledged without reading. For the LG UltraFine 5K it carries the tile location at 0x08/ 0x0c, the tile counts at 0x30/0x34 (2x1) and the whole display's size at 0x38/0x3c (5120x2880). Keep the counts and location per DPTX port, clear them whenever the port connects or disconnects, and take DP IN 1 as a tile only once DPTX port 0 reports a display of more than one tile. DCP sends the hint about 100 ms after DP IN 0's link comes up, so DP IN 1 waits for it for up to 2 s (the Thunderbolt side retries on -ENODEV) before it is routed the usual way. Tested on a MacBook Pro 14" M1 Pro (j314s) on 11.38 with its j314s device tree, an LG UltraFine 5K on the left Thunderbolt port and an HDMI monitor on dcpext0: at boot, after unplug/replug, across DPMS off/on and across two s2idle cycles (one of about 40 minutes): DPTXPort: port 0 carries tile (0,0) of a 2x1 tiled 5120x2880 display tiled: dpin1 joins dpin0 on DPTX port 1 (crossbar state 3) DPTXPort: port 1 carries tile (1,0) of a 2x1 tiled 5120x2880 display Rebased onto 12.2 and tested again on the j314s with 12.2's device tree, together with the Thunderbolt route-follows-CRTC series (aurora-silicon#44) and the tile-follow commit on top: the LG alone at login, LG and HDMI, DPMS off/on, s2idle and replug as above. 12.3 and 12.4 change only M3 display code, and the two commits apply to 12.4 as they are. Signed-off-by: Christian Bartels <[email protected]>
DjDeveloperr
pushed a commit
that referenced
this pull request
Oct 15, 2026
…d sink The previous change puts every second DP IN of a port on DPTX port 1 of the first one's pipeline. Two separate monitors behind a dock must keep their own pipelines instead. DCP tells the host the sink's tile topology through the DPTX SetTiledDisplayHints call, which the driver acknowledged without reading. For the LG UltraFine 5K it carries the tile location at 0x08/ 0x0c, the tile counts at 0x30/0x34 (2x1) and the whole display's size at 0x38/0x3c (5120x2880). Keep the counts and location per DPTX port, clear them whenever the port connects or disconnects, and take DP IN 1 as a tile only once DPTX port 0 reports a display of more than one tile. DCP sends the hint about 100 ms after DP IN 0's link comes up, so DP IN 1 waits for it for up to 2 s (the Thunderbolt side retries on -ENODEV) before it is routed the usual way. Tested on a MacBook Pro 14" M1 Pro (j314s) on 11.38 with its j314s device tree, an LG UltraFine 5K on the left Thunderbolt port and an HDMI monitor on dcpext0: at boot, after unplug/replug, across DPMS off/on and across two s2idle cycles (one of about 40 minutes): DPTXPort: port 0 carries tile (0,0) of a 2x1 tiled 5120x2880 display tiled: dpin1 joins dpin0 on DPTX port 1 (crossbar state 3) DPTXPort: port 1 carries tile (1,0) of a 2x1 tiled 5120x2880 display Rebased onto 12.2 and tested again on the j314s with 12.2's device tree, together with the Thunderbolt route-follows-CRTC series (#44) and the tile-follow commit on top: the LG alone at login, LG and HDMI, DPMS off/on, s2idle and replug as above. 12.3 and 12.4 change only M3 display code, and the two commits apply to 12.4 as they are. Signed-off-by: Christian Bartels <[email protected]> Signed-off-by: Chris Kearney <[email protected]>
This was referenced Nov 6, 2026
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.
On an M2 Max with a USB-C DP-alt monitor on dcpext, DPMS off never sticks: about 1.3 s later the display is on again.
dcp_poweroff()drops the synthetic HPD, the firmware reportshotplug_gated(0)(plus DPTX call 20, inactive sink), anddcpep_cb_hotplug()marks the connector disconnected. The reconnect worker scheduled bydcp_poweroff()then brings the display back, and compositors (Hyprland here) enable a display that appears. Every blank also bounces workspaces and focus to the other output.This patch ignores that unplug while the CRTC is off and the Type-C mux still reports the cable, as the driver already does for integrated panels, and leaves re-establishing the session to
dcp_poweron(). Cable removal still goes throughdcp_dptx_disconnect_oob().Tested: M2 Max (J416c), Aurora 7.1.12 (aurora2-10) + this patch: DPMS off on a USB-C DP-alt display stays off (12/12 samples over ~7 s, no disconnect/reconnect; previously relit after ~1.3 s); lock/idle blank keeps both panels dark and a key wakes both; unplug while blanked still removes the connector.
Kernel log of one cycle before the patch (DPMS off on the USB-C display at 20:00:51.67)