Skip to content

drm/apple: T6050: offer a merged mode only while a pair fits the platform - #2035

Merged
DjDeveloperr merged 2 commits into
integration/aurorafrom
djdev/t6050-merged-mode-limit
Nov 16, 2026
Merged

DjDeveloperr merged 2 commits into
integration/aurorafrom
djdev/t6050-merged-mode-limit

Conversation

@DjDeveloperr

@DjDeveloperr DjDeveloperr commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

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 platform

A 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.
  • The atomic check refuses such a timing, for a CRTC being enabled too.
  • After each hotplug, a display whose limit changed has its connector probed again. A display that runs a pair when the limit takes it away is also reported with a bad link status, so the compositor sets one of the modes it has left.
  • The peer stays reserved. The firmware keeps the merged timings for when a pair fits again.

2. drm/apple: T6050: run no paired call for a display the limit leaves unpaired

dcp_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 as 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 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: displays and engines are now initialised in dcp_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 set peer_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.

kit merged-mode log for the G81SF failed paired mode sets
k3 (without either commit) pair reserved and tried 4 (-19 twice, -2 twice)
k4 (commit 1) platform limit: 3 external displays on 4 engines: no pair, modes beyond one engine withheld 1 (-2)
k5, k6 (both commits) the same limit line 0
  • k6: the G81SF's connector lists 32 of the firmware's 33 modes; the one withheld needs a pair. It runs at 3840x2160@120, beside the Dell at 3840x2160@120 and the JTG at 1920x1280@60. Its link also needs the other fixes of the set; see the table below.
  • Not measured with these commits: the G81SF alone, or with one other external display, where it should pair at 240 Hz as before. The only change in those cases is the limit check, which returns false. The KUnit case checks that count for every plug order. The case was not run (the compile-proof config has no KUnit).

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):

  • internal panel;
  • Dell S2725QC (3840x2160@120) on the left-front port, DP alt mode;
  • Thunderbolt 5 dock on the right port: JTG S123 (1920x1280@60) on DP IN 0, Samsung Odyssey G81SF (3840x2160, up to 240 Hz) on DP IN 1.

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 the serial keyword added to one log line in the EDID PR.

kit adds Dell (left-front) JTG (dock DP IN 0) G81SF (dock DP IN 1) DP IN 1 in the kernel log
stock (default kernel) 3840x2160@120 1920x1080@60, no EDID, no name dark
k2b EDID defaults, and an earlier tunnel clock restart not up in that boot ¹ 1920x1080@60 ², "JTG S123" dark 11 IRQ_HPD, 3 relinks, 5 failed paired mode sets
k3 + atc tunnel open, + tunnel-only first 3840x2160@120 1920x1280@60 dark 10 IRQ_HPD, 3 relinks, 4 failed paired mode sets
k4 + merged-mode limit 3840x2160@120 1920x1280@60 dark 8 IRQ_HPD, 3 relinks, 1 failed paired mode set
k5 + no paired call under the limit, + tunnel clock only for its link 3840x2160@120 1920x1280@60 dark 7 IRQ_HPD, 3 relinks, no failed paired mode set, no clock rate change
k6 + DPTX connection DP IN, + held CM Ack bandwidth allocation 3840x2160@120 1920x1280@60 3840x2160@120 no IRQ_HPD, no relink

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,j714s with 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

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant