Repository navigation
drm/apple: T6050: offer a merged mode only while a pair fits the platform - #2035
Merged
Merged
Conversation
…form A J714s external display that one engine cannot drive at its fastest timing, a 4K 240 Hz one, has the unrouted fourth external engine reserved as its peer and is offered its merged modes. With two other external displays present, that pair takes the last of the T6050's four external engines: the paired mode set leaves the display dark while the other two light. macOS limits this. It gives a display a full pair only while the external displays and the pair leave an external engine unused: with one other external display present it pairs the 4K 240 Hz display, with two others it runs it on one engine at 4K 120 Hz and leaves the peer off, and with only two external displays it pairs it again. Apply that limit on the J714s, with the decision in the fabric core (dcp_fabric_merged_fits()) and a KUnit case for it: - dcp_mode_valid() does not offer a mode only a pair drives while the external displays present, the asking one included, and the pair would take every external engine of the DRM device; the display's fastest single-engine modes remain; - the atomic check refuses such a timing then, for a CRTC being enabled too; - after each hotplug, a display whose limit changed has its connector probed again, so its merged modes are withdrawn when a third external display arrives and offered again when one leaves; one that runs a pair when the limit takes it away is also reported with a bad link, for the compositor to set one of the modes it is left with; - the peer stays reserved, as no display is routed to it: the firmware keeps the merged timings for when the pair fits again, and a single-engine mode set stops a pair that ran, as before. Nothing changes while a pair fits: alone or with one other external display, the 4K 240 Hz display pairs as before. On a J714s with a DP alt mode display and a dock with two displays, the 4K 240 Hz display is offered every mode but the one that needs a pair. With the DP IN 1 link fixes of the same series it then runs at 3840x2160@120, beside the other two at 3840x2160@120 and 1920x1280@60. Signed-off-by: Diljit Singh <hey@djdev.me>
…npaired dcp_peer_modeset_v27() also ran for a single-engine mode set of a display with a reserved peer while the platform limit leaves it no pair. It sent the paired preparation calls to both engines and asked the firmware for the merged video data first; once the firmware had dropped the link that query failed, and the failure was returned as a failed paired mode set: apple-dcp 302e00000.dcp: paired mode set failed: -2 While the limit holds no paired call runs now. A pair that ran is stopped, both engines powered off and only this one powered on again, so the peer stays off as in macOS, and the mode is set on this engine alone. On a J714s with three external displays, the 4K 240 Hz display's failed paired mode set is gone from the boot log. Signed-off-by: Diljit Singh <hey@djdev.me>
This was referenced Nov 16, 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.
Part of a set of seven J714s external-display PRs, measured together (table below): #2032 EDID defaults, #2033 atc tunnel open, #2034 tunnel-only first (stacks on #1921), #2035 merged-mode limit, #2036 tunnel clock, #2037 DPTX connection DP IN and #2038 DP IN bandwidth allocation (merge those two together). Suggested order: #1921, #2006, then the set in any order.
What
Two commits, J714s (T6050) only.
1.
drm/apple: T6050: offer a merged mode only while a pair fits the platformA J714s external display that one engine can't drive at its fastest timing (a 4K 240 Hz one) has the unrouted fourth external engine reserved as its peer, and is offered its merged modes. With two other external displays present, that pair takes the last of the T6050's four external engines. The paired mode set then fails and the display stays dark, while the other two light.
A pair now fits only while the external displays and the pair leave an external engine unused. So the 4K 240 Hz display pairs alone or with one other external display, but not with two. The decision is
dcp_fabric_merged_fits()in the fabric core, with a KUnit case,fabric_t6050_merged_limit_test.dcp_mode_valid()withholds a mode only a pair drives while the limit holds. The display's fastest single-engine modes remain.2.
drm/apple: T6050: run no paired call for a display the limit leaves unpaireddcp_peer_modeset_v27()still ran its paired path for a single-engine mode set while the limit held. It sent the paired preparation calls to both engines and asked the firmware for the merged video data. Once the firmware had dropped the link, that query failed, and the mode set was reported aspaired mode set failed: -2. While the limit holds, no paired call runs now. A pair that ran is stopped, both engines powered off and this one powered on again, so the peer stays off. The mode is then set on this engine alone.Changes from what ran in the kits:
displaysandenginesare now initialised indcp_peer_limit_update_v27(), so its log line can't print them uninitialised on an unreachable early return; and one comment names both places that setpeer_limited.Stacking
Code-wise none: both commits apply to integration/aurora alone. The limit only takes effect with three external displays, and on the J714s that needs #1921 (and #2006 for a dock on the left-front port). In the kits they ran with #1921 and #2006.
Tested
The G81SF is the 4K 240 Hz display, on the dock's DP IN 1, beside the Dell and the JTG.
-19twice,-2twice)platform limit: 3 external displays on 4 engines: no pair, modes beyond one engine withheld-2)Compile: fedora-kcheck (cross build, M5 intg6 config), each commit: OK (vmlinux, Image and modules linked), 0 new warnings. checkpatch --strict: 0 errors; its one warning is the From/Signed-off-by name mismatch these commits always have.
Rig and kits
J714s (MacBook Pro 14", M5 Pro):
Each kit was integration/aurora 514ae1f + #2006 (which carries #1921) + #2018 as it was at 0521255 (its earlier PHY-side version) + the changes up to that row. Built natively on the M5, one-shot test boot, read-outs only (sysfs, debugfs, kernel log,
hyprctl monitors), then the default kernel restored and verified byte-identical. Since 514ae1f, integration/aurora has gained only #2022, which touches none of these files. The k6 tree is the tree of all seven PRs of this set merged on #2006, apart from a diagnostic log commit used only in the kits and theserialkeyword added to one log line in the EDID PR.The internal panel ran at 3024x1964@120 in every row. k6 was read at about 60 s and 150 s after boot, with the same result both times, and with no oops, WARN, DART fault or GPU fault.
¹ The left-front port's PD controller came up late in that boot and the Dell never entered DP alt mode. None of these changes touch that path.
² In k2b the JTG was on DP-1 and the compositor ran it at 1920x1080; from k3 on it is DP-5 at its native 1920x1280.
Neo rows needed
No. The limit applies only on
apple,j714swith firmware 27 (dcp_peer_limit_applies(),dcp_peer_limit_update_v27()). On other machines the new checks return before doing anything.🤖 Generated with Claude Code