Repository navigation
Conversation
|
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:
I haven't been through all of the RPC/peer lifetime code yet ( Assisted-by: LLM (Claude:Opus 5.5) |
|
Follow-up on the pairing lifetime, as promised. I found nothing wrong:
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>
149e65b to
a1e51ae
Compare
|
@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 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) |
|
Thanks, re-read at a1e51ae.
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>
|
Thanks, 2c88b99 and 3c9141d answer both points cleanly.
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) |
|
@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) |
|
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 Assisted-by: LLM (Claude:Opus 5.5) |
DjDeveloperr
left a comment
There was a problem hiding this comment.
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-peersphandles inapple,dcp.yaml/t6021-display2.dtsiand documenting the M2 Max (J416c) measurement methodology for the6144/1360 MHz/1274019840 px/sfallback 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), andmutex_trylock(&peer->external_lock)undert602x_scanout_lock.t602x_present_work()never takest602x_scanout_lock(preventing flush deadlocks),t602x_stop_locked()keeps framebuffer pins and peer reservation until both engines confirm stop, andt602x_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)
-
Broken host tests / CI not green (
2c88b9900ba1):- Both workflows on
2c88b9900ba1(Host tests#45007833945 andDevice tree checks#45007833917) are currentlyaction_required(unrun). - The last executed
Host testsrun (#44956011208, on149e65b9) failed 4 suites (448/452), and all 4 failures still apply to2c88b9900ba1:dcpext26-modeset-tests:drivers/gpu/drm/apple/apple_drv.cchangeddcp_crtc_atomic_modeset(crtc, commit)to 3 arguments(crtc, commit, locked), breaking the 2-argument stub attools/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.creplaceddrm_dev_unplug(&apple->drm)inapple_drm_uninit()anddrm_dev_unregister(&apple->drm)inapple_drm_init()withapple_drm_unplug_atomic(apple), failing the source-order assertions attools/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-63and peers) still extractstruct dcp_dptx_capsfromdcp-peer-v27.h(which moved todptx-caps.h) and do not provideT602X_TIMING_SIZE/dcp_t602x_wire_clock()now referenced byparser.c. - Fabric transaction selftests (#76–81, 87 in
tools/testing/selftests/drivers/gpu/apple-dcp/transaction.py) extractdcp_typec_route_busy(),dcp_typec_route_activate(), anddcp_typec_route_deactivate()fromdcp-fabric.c, which now calldcp_t602x_port_reserved()anddcp_t602x_stop()without stubs intransaction.py.
- Parser selftests (
- Please update the affected host test harnesses so
Host testsandDevice tree checks(dt_binding_check+CHECK_DTBSforapple,scanout-peers) both pass cleanly on the final head.
- Both workflows on
-
§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 froma1e51aeb6db7, prior to theapple,scanout-peersDT lookup and1360 MHzfallback-limit / non-RGB catalogue logic in3c9141dd..2c88b990, and does not yet include the §5 baseline regression checks (0SELinux denials or distro note,0failed systemd units,0newdmesg -l err..emergentries, 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 everyapple,t6020-dcpext(13.5) machine—including M2 Pro (t6020) and M2 Ultra (t6022)—such asiommu_device_use_default_domain()on the scanout/piodma devices,afk_getbuf()usingdma_alloc_coherent(),dcp_no_peer_hints_v13_5(), anddptx_native_controller_ops. Keeping the hold for an M2 Pro external DisplayPort boot + mode-switch + hotplug confirmation (as already requested in the thread).
- Re-test on live head (
Non-blocking notes (§2 / cleanup)
drivers/gpu/drm/apple/dcp-peer-v13_5.inc:360(t602x_peer_controller()): pollsep->services[]with20 × msleep(15)for unit 0 AV (BIT(0)). Completing a dedicated completion (or waking a waitqueue) fromdptx_controller_service_init()whenservice->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)afterA472has no comment explaining why firmware 13.5 needs that settle window (even thoughdcp-peer-v26_6.incdoes 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()): pollingmodeset_statewithusleep_range(1000, 2000)could similarly wake a completion/waitqueue fromdcp_t602x_tiling()onparam == 9 && *value >= 2.drivers/gpu/drm/apple/dptxep.c:1022,1618: can checkdcp->hw.t602x_paired_dp/dcp_t602x_ext13_5(dcp)directly instead of repeatingof_device_is_compatible(dcp->dev->of_node, "apple,t6020-dcpext").
Assisted-by: LLM (Gemini 4 Neon)
|
@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) |
|
Thanks for the follow-up. I re-read 2c88b99..6598a01. Host tests. I ran the host runner locally at 6598a01. Wakeups (c5f301b). This looks correct to me:
One small gap, bounded by the old timeouts: 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,
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.
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>
6598a01 to
3fcf89e
Compare
|
@RyanTheTide The M2 Max boot log on 6598a01e shows the optional service matched: 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.
The kernel logged zero new errors and zero AppArmor denials during this check. SELinux was inactive. One system unit failed ( @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) |
|
Thanks. The Assisted-by: LLM (Claude:Opus 5.5) |
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.
The final head exposed 33 timings. In the earlier sweep of 32 stock and 33 patched timings, only 1440p360 used two engines. Sweep revision.
With 360 Hz active, rebinding the Alienware’s USB-C controller removed the Type-C partner and disconnected the external DRM connector. The same monitor returned in 3.3 seconds. The internal panel stayed connected, and a second one-minute 360 Hz run recorded zero misses. The cable stayed plugged in for this test.
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 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.
Assisted-by: LLM (Codex:GPT-6 Astra, Codex:GPT-6.2 Astra)