Skip to content

drm/apple: enable paired DisplayPort scanout on T602x - #2743

Closed
Gusarich wants to merge 10 commits into
aurora-silicon:mainfrom
Gusarich:t602x-paired-displayport
Closed

Gusarich wants to merge 10 commits into
aurora-silicon:mainfrom
Gusarich:t602x-paired-displayport

Conversation

@Gusarich

@Gusarich Gusarich commented Nov 21, 2026 •

Copy link
Copy Markdown

On an M2 Max, the stock driver exposes the Alienware AW2725DF’s 2560 × 1440 modes up to 239.97 Hz. Its native 359.98 Hz DisplayPort timing exceeds one display engine’s capacity. Dell rates the HDMI input for 144 Hz at this resolution. Monitor specifications.

Change

Use a second, compatible display engine when a firmware timing exceeds one engine’s capacity and the second engine is free. Each engine scans half of the same framebuffer, and the monitor receives one DisplayPort signal. On firmware 13.5, pairing supports progressive, fixed-refresh SDR RGB over direct USB-C to DisplayPort. HDR, variable refresh and HDMI are outside this change.

Results

Each cell shows completed frames/s (missed refresh slots) as counted by the display firmware over one minute at 2560 × 1440. Hyprland composed the desktop workloads, including fullscreen. Stock baseline a84637dca209 and tested revision 6598a01e26a6. The current head 3fcf89efa49a has the same source tree. Mode-switch retest and boot log.

Presentation path Stock at 240 Hz Patched at 240 Hz Patched at 360 Hz
Direct KMS 239.97 (0) 239.97 (0) 359.98 (0)
Native app, windowed 238.83 (69) 238.85 (68) 179.97 (10,926)
Native app, fullscreen 238.85 (68) 238.87 (67) 197.17 (9,881)
TestUFO, windowed 239.41 (34) 239.20 (47) 263.48 (5,863)
TestUFO, fullscreen 239.23 (45) 239.13 (51) 335.01 (1,517)

The final head exposed 33 timings. In the earlier sweep of 32 stock and 33 patched timings, only 1440p360 used two engines. Sweep revision.

After a physical USB-C unplug/replug at 1440p360, the same Alienware resumed 359.98 Hz automatically. The internal panel stayed enabled. In the first one-minute direct KMS captures after reconnect, firmware counted five missed refreshes at 240 Hz and one at 360 Hz. Both firmware and DRM counted zero misses at each rate on a repeat. A separate USB-C controller rebind also restored the display. Physical hotplug measurements.

The M2 Max (J416c) test image applied the peer lists from the compiled board tree to the bootloader’s live tree. On Omarchy (Arch Linux ARM, AppArmor), the kernel logged zero messages at error priority or higher during the mode switches, presentation tests and reconnect. The physical cable cycle logged two USB-C warnings, in module_put and typec_altmode_update_active. The only failed service was speakersafetyd. It also fails on the stock test kernel because the bootloader supplies no amplifier levels.

Desktop frame pacing

The direct test flipped between ready buffers. For a fresh desktop frame at every 360 Hz refresh, the compositor has to deliver a finished buffer every 2.78 ms. CPU frequency and GPU wake-up latency can cut into that budget. When a buffer arrives late, the display repeats the previous frame.

An earlier kernel prototype briefly raised the CPU frequency floor after missed deadlines and adjusted GPU idle and cleanup timing. In one-minute TestUFO runs it delivered 359.95 frames/s windowed (2 misses) and 359.96 fullscreen (1 miss). CPU and GPU power policy also affects other workloads. After the scanout review, we’d like maintainer input on where that policy belongs and its power cost before proposing a separate pull request.

@RyanTheTide

Copy link
Copy Markdown
Contributor

Welcome, and a lovely result: 1440p at 359.98 Hz with zero misses on direct KMS, and 1440p360 as the only timing out of 33 that pairs, keeps the blast radius small. The firmware-counted frames/misses table is the right evidence. Some points from a first adversarial pass over 38d1f9a..149e65b:

  1. Where do the capacity limits come from? dcp-peer-v13_5.h hardcodes one engine's limits (T602X_SINGLE_WIDTH 6144, T602X_SINGLE_RATE 1.438 GHz, 6144 × 3456 × 60 active pixels/s), and dcp_t602x_needs_pair() decides pairing from them. Please say how each number was obtained. In particular, is it measured, from the firmware's own timing catalogue, or from the ADT? Our rule for limits is that they come from what the machine describes rather than per-SoC constants. The firmware already seems to know: stock exposes only up to 239.97 Hz, and your reply sets allocation.extra_pipes. If the firmware's catalogue or that allocation exchange can say "this timing needs two engines", keying needs_pair on it would carry over to other SoCs and firmware without a new table. If no such signal exists, a comment naming the measurement behind each limit would let the next person check it.

  2. Scope beyond the M2 Max. The code is selected for T602x on firmware 13.5. M2 Pro (one die) and M2 Ultra (two dies, dcp_t602x_match() per die) take the same path. Can you say what dcp_t602x_allowed() allows on each, and ideally show one M2 Pro boot where nothing pairs (or the pair uses the right engines)?

  3. Trailers. The commits carry Assisted-by: GPT-6 Astra and GPT-6.2 Astra in Codex. In this tree, commits carry only your Signed-off-by, and the tool disclosure goes in the PR description as its last line, in the form Assisted-by: LLM (<Vendor>:<Model>) (see https://github.com/aurora-silicon/agent-guidelines). Mainline dropped the commit tag too (docs: backport mainline's removal of the Assisted-by tag; say where LLM help is disclosed #2716). A reword of the three commit messages would fix it.

  4. The frame-pacing follow-up: keeping it out of this PR is right. A CPU-floor change after missed deadlines is a power-policy question for the whole system.

I haven't been through all of the RPC/peer lifetime code yet (dcp_t602x_release_port(), unbind while paired). I'll follow up on that separately.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Follow-up on the pairing lifetime, as promised. I found nothing wrong:

  • t602x_stop_locked() flushes the present work, and t602x_unbind_pair() destroys the worker while holding t602x_scanout_lock. t602x_present_work() never takes that lock, so neither can deadlock.
  • An unconfirmed stop at unbind quarantines the pair. Both pipes are set quiescing, the firmware-visible DMA moves to the retained list, both pipes stay fenced from new routes until reboot, and dcp_comp_bind() refuses a pipe that still holds retained DMA. That's the right fail-closed behaviour for a firmware that may still scan out from those buffers.
  • The device references for the pair are taken with get_device() and dropped symmetrically.

So the open items are those in my first comment: where the limits come from (or a firmware signal for "needs two engines"), M2 Pro/Ultra scope, and the commit trailers.

Assisted-by: LLM (Claude:Opus 5.5)

Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
@Gusarich
Gusarich force-pushed the t602x-paired-displayport branch from 149e65b to a1e51ae Compare November 21, 2026 22:41
@Gusarich

Copy link
Copy Markdown
Author

@RyanTheTide The 13.5 firmware allocator defaults to 6,144 pixels per line and a 1.438 GHz pixel clock per engine. On my M2 Max, firmware also reported a limit of 1,274,019,840 active pixels/s when it rejected 1440p at 359 Hz. I documented both sources beside the limit definitions.

Linux sets extra_pipes in the allocation reply. With the same EDID, firmware listed 360 Hz only after Linux offered a second engine. I haven’t confirmed a per-mode pairing signal available before that reply.

The M2 Max paired engine 1 with engine 3 (device-tree numbering). On the 16-inch M2 Pro, the only candidate is 2 → 1, and the driver excludes engine 1 as a peer when its fixed HDMI path is present. I’d expect single-engine operation there. On Ultra, both engines must be on the same die. I’ve only tested the Max. An M2 Pro boot report with an external monitor would help check the single-engine path.

I removed the attribution trailers from all five commits. Frame pacing stays separate.

Assisted-by: LLM (Codex:GPT-6 Astra, Codex:GPT-6.2 Astra)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, re-read at a1e51ae.

  • Trailers: gone from all five commits, thanks.
  • The 1,274,019,840 pixels/s figure is a measurement from your M2 Max (the firmware's own rejection), so it is fine to keep with that comment. Better still: if the firmware hands that limit back in the rejection or in an earlier reply, read it from there at runtime instead of a constant, so other T602x parts (and other firmware versions) get their own number.
  • The 6144-pixel width and the 1.438 GHz clock are described as "the 13.5 firmware allocator defaults". Please say where those two came from. If the firmware or the ADT reports them (a reply field, a dcpext property), read them from there. If they were found by reading the firmware image itself, they can't go in this tree in that form; a measured ceiling (the largest mode the firmware accepts single-engine) with the numbers in the commit message would be the way to state them.
  • dcp_t602x_allowed() hard-codes the crossbar as { 0x0c, 0x0d, 0x08, 0 }. Which engines can pair is a property of how the dcpext nodes are wired, and you already describe M2 Pro (2 -> 1 only, 1 excluded when the fixed HDMI path exists) and Ultra (same die only) as different. A DT property on each dcpext naming its possible peers (phandles) would carry all three without a per-SoC table, and the HDMI exclusion would then fall out of the tree instead of a special case.

The pairing and lifetime logic itself looked right last pass. Rows: your M2 Max row covers the paired path; the M2 Pro single-engine boot you mention is the other one needed.

Assisted-by: LLM (Claude:Opus 5.5)

Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
Describe the directional peers on the M2 Max laptop boards. Omit the
fixed HDMI engine as a peer. Without a peer list, keep the ordinary
single-engine path.

Use the DPTX service limits when supplied. Firmware 13.5 on an M2 Max
(J416c) did not report those properties. With extra pipes disabled,
varying one DisplayID timing on an AW2725DF produced these limits:

- At 1440 lines and 60 Hz, firmware accepted 6144 pixels per line and
  rejected 6145 with "max width: 6144".
- At 2560x1440 with totals of 5600x2500, the physical colour catalogue
  offered SDR RGB at 1360 MHz. At 1360.01 MHz only YCbCr 4:4:4 remained.
  The RGB value is a conservative fallback for pairing. Clock alone
  must not disqualify modes published with one engine or without RGB.
- The rejection for 2560x1440 at 359 Hz reported 1274019840 active
  pixels/s.

Keep the same limits in the allocation reply, mode checks and physical
timing readback. Check both engines have enough capacity for the offer.

Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks, 2c88b99 and 3c9141d answer both points cleanly.

  • Peers: apple,scanout-peers now names each dcpext's possible peers in the tree, dcp_t602x_is_peer() checks the phandle, the fixed HDMI engine is simply not listed, and a dcpext without the property keeps the single-engine path. The crossbar table is gone, so M2 Pro and Ultra follow from their trees.
  • Limits: the DPTX service limits are used when the firmware supplies them, and the fallback values are now measured on your M2 Max with the method in the commit message (6144 accepted / 6145 rejected, the 1360 MHz RGB edge, the reported active-pixel rejection) rather than described as firmware defaults. That's the provenance this needed, and using the same values in the allocation reply, mode checks and readback keeps them consistent.

Code is fine from our side. The M2 Pro single-engine boot you mentioned (no peers in its tree, ordinary path) is the remaining row.

Assisted-by: LLM (Claude:Opus 5.5)

@Gusarich

Copy link
Copy Markdown
Author

@RyanTheTide I tested the paired path on my M2 Max. I don’t have access to an M2 Pro, so I can’t test its single-engine path myself. Could someone with an M2 Pro boot this branch and confirm that an external DisplayPort monitor works?

Assisted-by: LLM (Codex:GPT-6 Astra, Codex:GPT-6.2 Astra)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. We don't have an M2 Pro in our lab either, so I've asked for an owner to run that row: boot this branch on an M2 Pro with an external DisplayPort monitor, then a mode switch and a hotplug. Until then, the paired path is proven on your M2 Max, and the single-engine path on M2 Pro is the same code that runs today when apple,scanout-peers is absent.

Assisted-by: LLM (Claude:Opus 5.5)

@DjDeveloperr DjDeveloperr left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2c88b9900ba1 against pre-pr-checklist.md (§1–§6).

The core T602x pairing, lock ordering, and fail-closed DMA retention design is solid:

  • §1 (DT peers & provenance): Moving peer routing from the hardcoded crossbar table to apple,scanout-peers phandles in apple,dcp.yaml / t6021-display2.dtsi and documenting the M2 Max (J416c) measurement methodology for the 6144 / 1360 MHz / 1274019840 px/s fallback limits resolves the earlier model-gating and provenance concerns cleanly.
  • §3 (Safety, locking, DMA retention): Lock ordering avoids ABBA via device_trylock(peer->dev), mutex_trylock(&dcp_typec_fabric_lock) (when !fabric_held), and mutex_trylock(&peer->external_lock) under t602x_scanout_lock. t602x_present_work() never takes t602x_scanout_lock (preventing flush deadlocks), t602x_stop_locked() keeps framebuffer pins and peer reservation until both engines confirm stop, and t602x_unbind_pair() fails closed by pinning the module, all 5 IOMMU groups/devices, and live framebuffers while draining RTKit RX and fencing both pipes from rebind until reboot.
  • §4 & §6 (Attribution, clean-room, naming): All 7 commits carry human identity and human Signed-off-by: only (zero AI trailers in commits), PR disclosure is present, and clean-room/naming checks pass.

Blockers (requesting changes)

  1. Broken host tests / CI not green (2c88b9900ba1):

    • Both workflows on 2c88b9900ba1 (Host tests #45007833945 and Device tree checks #45007833917) are currently action_required (unrun).
    • The last executed Host tests run (#44956011208, on 149e65b9) failed 4 suites (448/452), and all 4 failures still apply to 2c88b9900ba1:
      • dcpext26-modeset-tests: drivers/gpu/drm/apple/apple_drv.c changed dcp_crtc_atomic_modeset(crtc, commit) to 3 arguments (crtc, commit, locked), breaking the 2-argument stub at tools/asahi/dcpext26-modeset-tests.py:95 (error: too many arguments to function call, expected 2, have 3).
      • t6030-display-admission-tests (and --mutations): drivers/gpu/drm/apple/apple_drv.c replaced drm_dev_unplug(&apple->drm) in apple_drm_uninit() and drm_dev_unregister(&apple->drm) in apple_drm_init() with apple_drm_unplug_atomic(apple), failing the source-order assertions at tools/asahi/t6030-display-admission-tests.py:32-33.
      • apple-dcp (20/92 tests failed: #1, 15, 17, 20–22, 38, 41–44, 70–71, 76–81, 87):
        • Parser selftests (tools/testing/selftests/drivers/gpu/apple-dcp/rate.py:60-63 and peers) still extract struct dcp_dptx_caps from dcp-peer-v27.h (which moved to dptx-caps.h) and do not provide T602X_TIMING_SIZE / dcp_t602x_wire_clock() now referenced by parser.c.
        • Fabric transaction selftests (#76–81, 87 in tools/testing/selftests/drivers/gpu/apple-dcp/transaction.py) extract dcp_typec_route_busy(), dcp_typec_route_activate(), and dcp_typec_route_deactivate() from dcp-fabric.c, which now call dcp_t602x_port_reserved() and dcp_t602x_stop() without stubs in transaction.py.
    • Please update the affected host test harnesses so Host tests and Device tree checks (dt_binding_check + CHECK_DTBS for apple,scanout-peers) both pass cleanly on the final head.
  2. §5 Hardware evidence & multi-board coverage:

    • Re-test on live head (2c88b990 / post-CI-fix head) with §5 regression checks: The M2 Max results table in the PR body is from a1e51aeb6db7, prior to the apple,scanout-peers DT lookup and 1360 MHz fallback-limit / non-RGB catalogue logic in 3c9141dd..2c88b990, and does not yet include the §5 baseline regression checks (0 SELinux denials or distro note, 0 failed systemd units, 0 new dmesg -l err..emerg entries, plus mode switch and hotplug/unplug recovery).
    • M2 Pro single-engine row (§1 / §5): Even without apple,scanout-peers, several new code paths run on every apple,t6020-dcpext (13.5) machine—including M2 Pro (t6020) and M2 Ultra (t6022)—such as iommu_device_use_default_domain() on the scanout/piodma devices, afk_getbuf() using dma_alloc_coherent(), dcp_no_peer_hints_v13_5(), and dptx_native_controller_ops. Keeping the hold for an M2 Pro external DisplayPort boot + mode-switch + hotplug confirmation (as already requested in the thread).

Non-blocking notes (§2 / cleanup)

  • drivers/gpu/drm/apple/dcp-peer-v13_5.inc:360 (t602x_peer_controller()): polls ep->services[] with 20 × msleep(15) for unit 0 AV (BIT(0)). Completing a dedicated completion (or waking a waitqueue) from dptx_controller_service_init() when service->cookie == BIT(0) would avoid the polling loop under §2.
  • drivers/gpu/drm/apple/dcp-peer-v13_5.inc:431 (t602x_pair_power()): msleep(100) after A472 has no comment explaining why firmware 13.5 needs that settle window (even though dcp-peer-v26_6.inc does the same); please document the rationale or replace with a firmware completion signal if one exists.
  • drivers/gpu/drm/apple/dcp-peer-v13_5.inc:572 (t602x_set_mode()): polling modeset_state with usleep_range(1000, 2000) could similarly wake a completion/waitqueue from dcp_t602x_tiling() on param == 9 && *value >= 2.
  • drivers/gpu/drm/apple/dptxep.c:1022,1618: can check dcp->hw.t602x_paired_dp / dcp_t602x_ext13_5(dcp) directly instead of repeating of_device_is_compatible(dcp->dev->of_node, "apple,t6020-dcpext").

@Gusarich

Copy link
Copy Markdown
Author

@DjDeveloperr I fixed the four failing host suites, replaced both polling loops, and addressed the remaining driver notes. All 92 Apple DCP tests pass locally. The binding passed with zero new warnings across 138 device trees.

I updated the table with M2 Max measurements from 6598a01e26a6. Direct KMS recorded zero misses at 240 and 360 Hz, including the 360 Hz repeat after a USB-C controller rebind. I don’t have an M2 Pro to verify its single-engine path.

Could you approve the Host tests and Device tree checks runs on this head and take another look?

Assisted-by: LLM (Codex:GPT-6 Astra, Codex:GPT-6.2 Astra)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks for the follow-up. I re-read 2c88b99..6598a01.

Host tests. I ran the host runner locally at 6598a01. dcpext26-modeset-tests, t6030-display-admission-tests (with and without --mutations) and the apple-dcp selftests (90/90) now pass, and so does every other dcp, display, afk and t60 suite. At 2c88b99 the same apple-dcp run fails 20/90, so a5892d4 is what fixes them. Both workflows on 6598a01 are still waiting for a maintainer to approve the run, so dt_binding_check/CHECK_DTBS for apple,scanout-peers still have to go green there.

Wakeups (c5f301b). This looks correct to me:

  • Every waker publishes its state before wake_up_all, and wait_event_timeout queues before it tests. That covers the param 9 write in dcp_t602x_tiling() (dcp-peer-v13_5.inc:469), the A412 reply (:560), the controller init and dcp_peer_forget() (dcp-peer-v26_6.inc:182).
  • The outcome is still decided under dcp_peer_lock by dcp_t602x_tiling(owner, false, 1, 9, ...), so a racing unbind can't slip past it.
  • A crash wakes the waiter through dcp_peer_forget().
  • t602x_modeset_done() wakes the dcp rather than touching the waiter after its ref is dropped.
  • The controller wait condition only takes spinlocks.

One small gap, bounded by the old timeouts: dcp_rtk_crashed() returns before dcp_peer_forget() when quiescing is set, and the other crashed = true sites don't wake. Neither does the 300 ms controller wait (:364), which also never checks crashed or peer_unbinding. A crash in those windows waits out the full timeout. Fine as is, but adding READ_ONCE(peer->crashed) to the controller condition would make the two waits behave alike.

Expert interface (6598a01). The 13.5 controller endpoint has no OPEN handshake, so nothing is sent to the firmware either way. Before this change, the announcement went unmatched with an error log; now it matches, prepare refuses, and the log is info. There is no protocol change and no new stall risk, and it is selected by the 13.5 ABI, not a version string. Two points:

  • Matching uses the EPICProviderClass when the init props parse (afk.c:1789). If 13.5 announces this service with class AppleDCPDPTXController, the first entry takes it and dptx_native_controller_prepare() rejects it with the old error, so the new entry never fires. Could you paste the boot-log line at this head that shows AFK optional dcpexpert-service ... is unsupported?
  • The three new commits have no message body. Please add a short why to each. For 6598a01, say that this only stops an unmatched service being logged as an error, and that no message goes to the firmware.

Hardware. The results table is from a1e51ae. Since then, the peers moved to DT, the limits changed, and c5f301b rewrote the 360 Hz modeset wait itself.

  • Your M2 Max: please re-run at 6598a01. Include the 1440p360 direct-KMS row, a mode switch, an unplug/replug, and the counts of SELinux denials, failed units and new dmesg -l err,crit,alert,emerg lines.
  • M2 Pro: still needs an owner's external DisplayPort boot, mode switch and hotplug at this head. The expert-service entry now also runs there.

Assisted-by: LLM (Claude:Opus 5.5)

The paired scanout changes left the host fixtures using the old modeset
signature, teardown sequence and DPTX capability layout. Exercise the
current interfaces and check that teardown releases only owned buffers.

Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
Polling for the AV controller and tiling phase can delay a modeset
after firmware has already reported readiness. Wake the waiting thread
from the firmware callbacks and recheck the tiling phase under the peer
lock before continuing.

Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
The 13.5 controller advertises dcpexpert-service alongside the DPTX
interfaces used for scanout. Mark it optional so the announcement
no longer produces an unmatched-service error. Declining it sends no
message to firmware because this endpoint has no OPEN handshake.

Signed-off-by: Gusarich <danielsedovzzz@gmail.com>
@Gusarich
Gusarich force-pushed the t602x-paired-displayport branch from 6598a01 to 3fcf89e Compare November 22, 2026 16:07
@RyanTheTide

Copy link
Copy Markdown
Contributor

Checked 3fcf89e: commit messages only. All three now say why, which closes that nit. Code is range-diff identical to 6598a01. The other open items (the boot-log line showing the optional service matches, rows at the new head, the M2 Pro owner row) are unchanged.

Assisted-by: LLM (Claude:Opus 5.5)

@Gusarich

Gusarich commented Nov 22, 2026 •

Copy link
Copy Markdown
Author

@RyanTheTide The M2 Max boot log on 6598a01e shows the optional service matched:

apple-dcp 48dc00000.dcp: AFK optional dcpexpert-service (dcpexpert-service) is unsupported on channel 9

The patched rows in the PR were measured on that boot. The current head 3fcf89ef has the same source tree. Only the earlier 32/33-mode sweep used a1e51aeb.

I repeated the 2560 × 1440 mode switch after your review. Each direct KMS capture lasted 60.70 seconds.

Firmware frames/s Frames completed Firmware misses DRM misses
239.97 14,566 0 0
359.98 21,850 0 0

The kernel logged zero new errors and zero AppArmor denials during this check. SELinux was inactive. One system unit failed (speakersafetyd, also failed on stock) and zero user units failed. The cable stayed connected. The controller rebind passed earlier, and a physical cable reconnect on this revision is still pending.

@DjDeveloperr could you approve Host tests and Device tree checks for this head? I only have an M2 Max. An M2 Pro owner is still needed to check external DisplayPort at boot, a mode switch and hotplug.

Assisted-by: LLM (Codex:GPT-6 Astra, Codex:GPT-6.2 Astra)

@RyanTheTide

Copy link
Copy Markdown
Contributor

Thanks. The AFK optional dcpexpert-service ... is unsupported on channel 9 line is the evidence I asked for: the new entry matches, and the old error path isn't hit. The 2560x1440 switch at 239.97 and 359.98 Hz with 0 firmware and 0 DRM misses over 60.7 s, 0 new kernel errors, and the same tree as 3fcf89e cover the reworked wait path on the M2 Max. Approving from my side. Still open before merge: the physical reconnect on this revision, and the M2 Pro single-engine row from an owner.

Assisted-by: LLM (Claude:Opus 5.5)

@Gusarich

Copy link
Copy Markdown
Author

@RyanTheTide @DjDeveloperr I physically unplugged and reconnected the Alienware AW2725DF on the M2 Max at 2560 × 1440, 359.98 Hz. The external connector was down for 8.73 seconds including the time unplugged. The same display came back at 359.98 Hz automatically. The internal panel stayed enabled.

Each direct KMS run lasted 60.70 seconds. The repeat used the same cable connection.

Run Mode Firmware frames/s Firmware misses DRM misses
After reconnect 240 Hz 239.89 5 5
After reconnect 360 Hz 359.96 1 2
Repeat 240 Hz 239.97 0 0
Repeat 360 Hz 359.98 0 0

The cable cycle triggered two kernel warnings from cd321x_update_work, one in module_put and one in typec_altmode_update_active. I don’t have a matching physical unplug on stock to attribute them. The test window had zero error-level or higher kernel messages and zero AppArmor denials. SELinux was inactive. One system unit failed (speakersafetyd, also on stock) and zero user units failed.

Could you both record a formal review on the current head and approve if this addresses your comments? Could one of you also approve Host tests and Device tree checks to run? I only have an M2 Max. We still need an M2 Pro owner to check external DisplayPort at boot, a mode switch and hotplug.

Assisted-by: LLM (Codex:GPT-6 Astra, Codex:GPT-6.2 Astra)

@RyanTheTide RyanTheTide left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved at 3fcf89e. The physical reconnect on the M2 Max brings the AW2725DF back at 359.98 Hz automatically with the internal panel still up, and the repeat runs at 240 and 360 Hz have 0 misses. The few misses right after the reconnect are the expected re-train window. The two cd321x_update_work warnings (module_put, typec_altmode_update_active) come from the type-C port driver, not from this code, but they're worth a separate issue with the trace. I've started the host-tests and dt-checks runs. The M2 Pro owner row is still the one thing before merge.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor

@Gusarich status against integration/aurora daa9e2d: the ten commits merge cleanly even though 35 commits have touched drm/apple and its tests since a84637d, and the host tests pass on the merged tree (34 dcp, 17 t60 and 2 afk runs, 0 failures). The red dt-checks run on 3fcf89e failed while uploading its artifact; the check itself reported 0 new warnings over 138 DTBs and the binding passed, so it needs a re-run, not a fix. Still open: a re-review at 3fcf89e (the change request on file is against 2c88b99) and the M2 Pro single-engine row from an owner. One question: the 100 ms settle after the 13.5 pair power request has no ready event behind it; if the firmware reports anything usable there, could the code wait on that instead?

@github-actions github-actions Bot added area:platform Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot) labels Nov 24, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: HOLD at 3fcf89ef

Blockers:

  • Merge conflicts against main (CONFLICTING / dirty): Rebase onto current main to resolve conflicts in drivers/gpu/drm/apple/iomfb.c (dcp_modes_replace, dcp_find_mode vs lookup_mode_matching, dcp_mode_settable), drivers/gpu/drm/apple/parser.c (parse_mode), drivers/gpu/drm/apple/parser-test.c, and tools/testing/selftests/drivers/gpu/apple-dcp/rate.py introduced by #3052.
  • drivers/gpu/drm/apple/dcp-peer-v13_5.inc:133,1198 (post-rebase HDR / colour-mode atomic check): Current main enables iomfb_template_pq (dcp_hdr_output_supported() is now true on 13.5 external DP) and full DRM colour-property validation in dcp_crtc_check_hdr(). Once rebased onto main, dcp_t602x_check() must reject HDR PQ (HDMI_EOTF_SMPTE_ST2084) and non-default / non-RGB colour requests in atomic_check rather than accepting them and failing later with -EINVAL on owner->pq_requested in dcp_t602x_modeset() (or silently programming sdr_rgb.id). Also avoid stack-allocating the enlarged struct dcp_display_mode in dcp_t602x_needs_pair(), dcp_t602x_check(), and dcp_t602x_modeset() when rebasing onto dcp_find_mode().
  • CI not green (dt-checks FAILURE): dt-checks (run 45042037653) passed dt_binding_check, CHECK_DTBS, ADT coverage, and DART power-domain checks, then failed in Keep the warning lists due to an artifact upload timeout (CreateArtifact). Re-run CI to green on the rebased head (host-tests, dt-checks, and pr-text).
  • §4 / §5 PR body hygiene and exact-head HW evidence: Remove the AI attribution footer line at the end of the PR description (all 10 commits are already clean), and add the required **What:**, **Tested:**, **Risk:** (one-way/two-way door + affected Macs; note the new apple,scanout-peers DT binding), and **Not yet:** top lines with detail folded below. Because resolving the 4 code conflicts changes touched files, include an updated M2 Max (J416c) test row at the new post-rebase head SHA (plus note M2 Pro single-engine coverage under Not yet: if still awaiting an owner run).

Checked: Interdiff 2c88b990..3fcf89ef and full 35-file diff against §1–§6, all 10 commits, CI runs (host-tests green, dt-checks artifact-upload failure), live main merge-tree conflicts, and M2 Max hardware rows.

Evidence

Prior blockers resolved in 2c88b990..3fcf89ef

  • c7e0a637fd85 (host selftests): Fixed all 4 previously failing suites (dcpext26-modeset-tests.py, t6030-display-admission-tests.py, apple-dcp rate.py / lifecycle.py / recovery.py / transaction.py). host-tests (run 45042037611) is green on 3fcf89ef.
  • 6ed43cc2bf17 (waitqueue wakeups & cleanup): Replaced the 20 × msleep(15) AV-controller poll in t602x_peer_controller() and usleep_range poll in t602x_set_mode() with wait_event_timeout on t602x_pair_wait woken from dptx_t602x_controller_init(), dcp_t602x_tiling() (param == 9 && *value >= 2), t602x_modeset_done(), and dcp_peer_forget(). Verified wait_event_timeout evaluates t602x_get_av_controller(ep) without leaking a service reference and that dcp_t602x_tiling() still decides the outcome under dcp_peer_lock. Switched dptxep.c checks from of_device_is_compatible() to dcp->hw.t602x_paired_dp and documented the msleep(100) settle window in t602x_pair_power().
  • 3fcf89efa49a (optional expert service): Marks dcpexpert-service optional on dptx_t602x_controller_ops and returns -EOPNOTSUPP in prepare (no wire message sent on this endpoint). Confirmed by the M2 Max boot log line AFK optional dcpexpert-service (dcpexpert-service) is unsupported on channel 9.

Checklist breakdown (§1–§6)

  • §1 (No model gating): Pass. Peer topology comes from apple,scanout-peers DT phandles (Documentation/devicetree/bindings/display/apple,dcp.yaml, arch/arm64/boot/dts/apple/t6021-display2.dtsi); DPTX service limits are used when reported with measured M2 Max fallback ceilings documented in 2c88b9900ba1.
  • §2 (Production-ready): Pass on default kernel command line. Non-blocking notes:
    • drivers/gpu/drm/apple/dcp-peer-v13_5.inc:364 (t602x_peer_controller()): adding READ_ONCE(peer->crashed) || READ_ONCE(peer->peer_unbinding) to the wait_event_timeout condition would match t602x_set_mode() and avoid waiting the full 300 ms on a peer crash/unbind.
    • drivers/gpu/drm/apple/dcp-peer-v13_5.inc:441 (t602x_pair_power()): msleep(100) after A472 is now documented; worth replacing if firmware exposes a power-ready event later.
  • §3 (Safety / locking / regression safety): Pass on 3fcf89ef itself (lock ordering, fail-closed DMA retention/quarantine on unconfirmed stop, non-T602x paths gated by dcp_t602x_ext13_5() / dcp->hw.t602x_paired_dp). See blocker above for the post-rebase HDR / colour-mode interaction with #3052 on main.
  • §4 (IP & attribution): All 10 commits carry human author Gusarich and human Signed-off-by: only (0 AI trailers in commits). Blocking item: remove the AI attribution footer line from the PR description.
  • §5 (Evidence & PR structure): M2 Max (J416c) testing at 6598a01e (tree-identical to 3fcf89ef) verified 2560×1440 at 239.97 Hz and 359.98 Hz (0 firmware/DRM misses on repeat direct KMS captures), mode switches, physical USB-C unplug/replug auto-recovery to 359.98 Hz with internal panel active, 0 new err..emerg kernel messages, 0 AppArmor denials (SELinux inactive), and 1 failed unit (speakersafetyd, also failed on stock). Blocking items: add What:/Tested:/Risk:/Not yet: structure to the PR body, and refresh the M2 Max row at the post-rebase head SHA once the 4 conflicts with main are resolved. M2 Pro single-engine verification (apple,t6020-dcpext without apple,scanout-peers) remains requested from an owner and should be listed under Not yet: if still pending.
  • §6 (Naming): Pass.

CI & mergeability snapshot at 3fcf89efa49a

  • mergeable: false (mergeable_state: dirty) — 4 content conflicts against main (a9cd131e82076).
  • host-tests (45042037611): SUCCESS.
  • dt-checks (45042037653): FAILURE (CHECK_DTBS, dt_binding_check, ADT coverage, and DART power-domain checks all passed; actions/upload-artifact@v4 timed out on CreateArtifact).

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 24, 2026

@DjDeveloperr DjDeveloperr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: FINISH, then merge at 3fcf89efa49a

Blockers:

  1. The branch conflicts with main in drivers/gpu/drm/apple/iomfb.c (dcp_modes_replace, dcp_find_mode against lookup_mode_matching, dcp_mode_settable) and parser.c, and CI is red until it's rebased.
  2. Missing row: one T602x (M2 Pro or Max) at the rebased head driving a paired DisplayPort display (a 5K or 6K panel in its native mode).

Rows before merging: AFK and apple_drv.c run on every Mac, so besides the T602x row it also needs one boot at the rebased head on another generation with an external display working.

Checked: thank you for the paired-scanout work. No Apple material, no gates: pairing is described in the DT and binding.

@DjDeveloperr
DjDeveloperr dismissed stale reviews from themself November 25, 2026 01:46

Superseded by the review at 3fcf89e

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Merge readiness at 3fcf89ef: not ready yet

Check Detail
CI at head no failing: dt-checks
Review no approved by RyanTheTide, but GitHub does not count it yet (code owner from Core or Omarchy Mac needed, or approval went stale)
Requested changes no requested by DjDeveloperr
Hardware row at head ok comment at 3fcf89ef
Conflicts no merge conflicts with main: merge it in (no force push)
PR text adopt when you next edit add a 'Tested:' line; a 'Risk:' line (door and Macs) (guide)

Areas: area:display, area:gpu, area:platform

Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels.

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Nov 25, 2026
@RyanTheTide

Copy link
Copy Markdown
Contributor

This branch conflicts with main now. When you push the fixes for the open review items, please merge main in with the same normal push (no force push). If we hear nothing within 24 hours, a maintainer will do the forward merge, but the review items still need you.

@DjDeveloperr

Copy link
Copy Markdown
Contributor

What's left: the branch conflicts with main in drivers/gpu/drm/apple/iomfb.c and parser.c, which also turns dt-checks red, so it needs a rebase. Then one M2 Pro or M2 Max run at the new head driving a paired DisplayPort display in its native mode. Maintainer edits are off on this branch, so we can't do the rebase for you.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the paired-scanout work, and for taking the earlier points on board. A second-reviewer pass at 3fcf89ef, in addition to Dj's FINISH (rebase + T602x row):

  1. Limits: thanks for moving them into the DT (2c88b990). That's the right home. One question left: dcp_t602x_limits() still falls back to 6144 / 1360 MHz / 1274019840 when the DT caps are absent. If the binding makes the three caps required on every T602x external DCP node that enables pairing, the fallback can go. Then a board without measured limits simply never pairs, rather than pairing against M2 Max/AW2725DF numbers. If you'd rather keep the fallback, please make it M2-Max-only or log once when it's used.
  2. Scope: M2 Pro (one die) and M2 Ultra (two dies, dcp_t602x_match() per die) take the same path. When you rebase, please say what pairs on each (or show one non-Max boot where nothing pairs, or the right engines pair).
  3. Lifetime: please cover unbind and hot-unplug while paired (dcp_t602x_release_port() with the peer still holding the second engine) in the selftests or one row line. That's the path most likely to leak an engine reservation.

Trailers look right now: Signed-off-by only. No other blockers from this pass.

@RyanTheTide

Copy link
Copy Markdown
Contributor

@Gusarich: stale-PR closeout. We tried to carry this onto main ourselves, but it is not a mechanical merge any more. Main has since reworked what the T602x pairing depends on: #3052 replaced the mode lookup (lookup_mode_matching is now dcp_find_mode with the notch twins), rewrote apple_atomic_check, and changed the parser tests. Ten files conflict.

Everything that is open, in one list:

  1. Port the paired-DP scanout onto main's dcp_find_mode and the new atomic check, as a merge with main (no force push).
  2. Recheck HDR/colour against iomfb_template_pq (Dj's hold).
  3. An M2 Max paired-DP row at the new head, from you (the lab has no M2 Max), plus our second-family external-display boot.

If you can do 1 and 3, it merges with no further review rounds. If you would rather hand it over, say so and our display lane takes the port and keeps your authorship. Either way the next step is due 12-01.

@aurora-silicon-review aurora-silicon-review Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: MERGE at 3fcf89efa49a

Converts this App's earlier review at the same head to an approval under the 12-01 merge bar (better than before and doesn't break; block only on a shown failure). No code blocker was found in it. The merge gate (a row on one Mac at this head + fast CI) is tracked by pr-readiness, not held here.

Checked: Code reviewed in the earlier App review at this head (6101469914).

Follow-ups (not blocking): make DT limits required or log fallback, say what pairs on M2 Pro/Ultra, unbind/hot-unplug while paired coverage

@github-actions github-actions Bot added merge-conflict Conflicts with the base branch (bot) and removed merge-conflict Conflicts with the base branch (bot) labels Dec 1, 2026
@DjDeveloperr

Copy link
Copy Markdown
Contributor

Closing this as stale. It has conflicted with main since about 11-25, and the change request from 11-25 is still open. Ten files conflict now: #3052 replaced the mode lookup and rewrote the atomic check this builds on, so carrying it over is a port rather than a merge, and maintainer edits are off on this branch.

The branch stays. Reopen this, or open it again as a new PR, once it's ported onto main, with the M2 Pro or M2 Max row driving a paired display in its native mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:display Area from CODEOWNERS (bot) area:gpu Area from CODEOWNERS (bot) area:platform Area from CODEOWNERS (bot) changes-requested A reviewer requested changes (bot) ci-failing A check failed at the PR head (bot) merge-conflict Conflicts with the base branch (bot) needs-review No approving review from Core or Omarchy Mac yet (bot) needs-template PR body lacks Tested or Risk (bot)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants