Repository navigation
drm/apple: firmware 27: start the remote allocator only where advertised; let a dcpext come up before its DP port is announced - #2526
Conversation
|
Claude Opus 5.5 on @satchlj's behalf. Hardware result on MacBook Air M2 (J413, T8112), macOS 27.2 (26B123) stub: pass. The change is now part of phellos's default. Tested in phellos's upstream-first build, and it is now the default (one-shot
🤖 Generated with Claude Code |
|
Claude Opus 5.5 on @satchlj's behalf: hardware run.
Build: phellos (MacBook Air M2, J413, macOS 27.2 / 26B123 stub), default rebuilt 2026-11-20 = linux |
|
Host-suite note from stacking this on #2541 for the M3 Air (J615) 27.2 display work: A stub (or keying the check on something the unit already models) would fix it. CI on a branch stacked on this one (#2580) shows two more host units broken the same way: Assisted-by: LLM (Claude:Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. @RyanTheTide thanks, reproduced and fixed in two new commits (no force push):
Results:
Not yet on hardware: 🤖 Generated with Claude Code |
|
Claude Opus 5.5 on @satchlj's behalf: hardware result for the new head.
This was phellos's third upstream-first default (one-shot 🤖 Generated with Claude Code |
|
Heads-up from the M3 Air (J615) display work, which depends on this PR via #2580: neither commit here (afc241a, 9a9ae8e) has a J615 rows on this PR's head are in #2580: with #2541, the remote allocator is started only where firmware 27 advertises it, and the internal panel comes up on the 27.2 image. Assisted-by: LLM (Claude:Opus 5.5) |
…es it Firmware 27 lists the RTKit endpoints its application uses. The 27.2 DCP on T8112 (MacBook Air M2, J413) advertises IOMFB (0x37) but no remote allocator (0x2d). Starting the unadvertised endpoint fails, so the internal panel never comes up. Start the remote allocator on firmware 27 only when the firmware advertises it. Firmware that advertises it is unchanged. Signed-off-by: Satya Benson <satya@benson.earth>
…ounced The 27.2 dcpext on T8112 (J413) neither announces its DPTX port at boot nor gives powerlog-service and its other early services an EPIC class. On this tree, dptxep_init() then failed with -ETIMEDOUT, the Type-C route muxes were never registered, and both USB-PD controllers stayed deferred until the deferred-probe timeout. For a processor with the generic apple,dcpext compatible on firmware 27: - treat the unannounced port as 14.7 and the J613 ext26 do: leave the endpoint up for a later announcement; - accept the class-less init reports, as H17G and firmware-27 T8142 already do. Signed-off-by: Satya Benson <satya@benson.earth>
The firmware-27 dcpext checks in afk_recv_handle_init() and dptxep_init() looked up the "apple,dcpext" compatible on every call. Record it once in dcp_platform_probe_pipe() as dcp->dcpext, next to the other per-processor roles, and test the field. The apple-dcp host suite's service-rebind unit compiles afk.c against a model of struct apple_dcp with no device tree, so the OF call did not build there (host.c: undeclared of_device_is_compatible). The model gets the field, false: none of its scenarios is an external processor. run.py --group all: 89/89. Signed-off-by: Satya Benson <satya@benson.earth>
…pext iomfb-startup-tests compiles iomfb_start_rtkit(), which now asks RTKit whether firmware 27 advertises the remote allocator. Give the unit an apple_rtkit_has_endpoint() with a switchable answer and run the matrix both ways: firmware 27 starts the allocator only where it is advertised, IOMFB in every case; H17P and the ext26 map are unchanged. dcpext26-startup-tests compiles afk_recv_handle_init(); its struct apple_dcp gets the dcpext field, true for its native dcpext (its H17P firmware does not reach the firmware-27 check). Signed-off-by: Satya Benson <satya@benson.earth>
419bb47 to
e42bffd
Compare
… the ports on DPTX_ENDPOINT On phellos (J413, macOS 27.2 stub) a USB-C monitor never came up: on hotplug, dcpext 271c00000 logged "dcp_dptx_connect: dptx service for port 0 not enabled" five times, then "Type-C DPTX reconnect failed after 5 retries: -19". At boot it had already logged "DPTX port 0 not announced yet". The 27.2 dcpext advertises RTKit endpoints 0x20-0x2c, 0x31 and 0x37, so both DPTX endpoints. The driver opened firmware 27's DPTX_ENDPOINT_V2 (0x2c) with no DPTX controller, as for the T6050 external profile, and the firmware announced nothing on it. Like T8142's dcpext, which runs the same firmware-27 image beside its internal DCP, it serves AppleDCPDPTXController on 0x24 and AppleDCPDPTXRemotePort on DPTX_ENDPOINT (0x2a). Select both for a T8112 dcpext on firmware 27; nothing else changes. Correct the comment in dptxep_init() that took the silence for late announcement. Tested on phellos (J413, 27.2, up4 kernel, this driver loaded as a module in a watchdog-protected one-shot, no monitor attached): - before: port 0 not announced on 0x2c; - after: four controller services on 0x24 (dcpav- and dcpdp-controller-epic, units 0 and 1), then AppleDCPDPTXRemotePort on 0x2a channels 1 and 3 with DPTX0/DPTX1 caps, no "not announced yet"; internal panel connected, no new error lines. Hotplug with a monitor is untested. Signed-off-by: Satya Benson <satya@benson.earth>
|
Claude Opus 5.5 on @satchlj's behalf. New commit b7fbee4: the T8112 dcpext on firmware 27 now opens the DPTX controller (0x24) and its ports on DPTX_ENDPOINT (0x2a), not on DPTX_ENDPOINT_V2 (0x2c). Why. At Satya's hands-on check on phellos (J413, 27.2 stub, up3 default, which carries this PR at 419bb47), a USB-C monitor never lit up. On hotplug, dcpext 271c00000 logged Tested on phellos. Up4 default kernel (7.3.0-1-up4-ARCH, carries #1832, which gives this dcpext V_27_0). This driver was built from the up4 tree plus this commit, as a renamed module (
Untested. Hotplug and modeset with a monitor, on either USB-C port. That needs a monitor on phellos. 🤖 Generated with Claude Code |
|
J615 row (15-inch MacBook Air M3, T8122), macOS 27.2 stub, external display processor (dcpext) started by the lab display gate.
So the T8122 27.2 dcpext has the same endpoint layout as T8112's; the check could take both compatibles (or key on the firmware-27 dcpext advertising both endpoints). |
…e firmware advertises b7fbee4 opened the DPTX controller on DPTX_CONTROLLER_ENDPOINT (0x24) and the ports on DPTX_ENDPOINT (0x2a) for "apple,t8112-dcpext" only. On a J615 (T8122, "apple,t8122-dcpext") on the 27.2 stub nothing changed: "DPTX port 0 not announced yet". With that compatible added, RyanTheTide's J615 opened AppleDCPDPTXController on 0x24 (channels 1, 3, 5, 7) and announced both AppleDCPDPTXRemotePort services on 0x2a (channels 1 and 3) at boot: the same layout as T8112's and T8142's dcpexts. Select it by what the firmware advertises, not by a compatible: a dcpext on firmware 27 whose RTKit endpoint map has both 0x24 and 0x2a gets the controller and its ports there (dcp_v27_dptx_layout()). The map is not known in dcp_platform_probe_pipe(), where b7fbee4 decided: RTKit is woken only at bind (dcp_comp_bind()). So the choice moves to dcp_start(), after the ext26 branch and before any DPTX endpoint opens; the order in which the endpoints are opened is the one measured on J413 and J615. Hardware data that names an endpoint keeps it, so no other processor moves even if its firmware advertises both endpoints: - T8142's dcpext already names DPTX_ENDPOINT, with the controller; - the T6050 dcpext and the firmware-27 T6041 dcpext used firmware 27's default DPTX_ENDPOINT_V2 (0x2c), with no controller. Their hardware data now names it, so they open what they opened before. Whether they advertise 0x2a is not known here. Internal processors, other firmware and ext26 are not affected. tools/asahi/dcp-v27-dptx-layout-tests.py builds the production selector and dptxep_init()'s endpoint expression over firmware, processor role, advertised maps and pinned endpoints, checks that the selector tests no compatible and runs in dcp_start() before the DPTX endpoints open, and kills three mutations (no advertisement check, pinned endpoint ignored, internal processors included). Not tested on hardware: the J413 and J615 rows above were taken with the compatible-keyed check; hotplug and modeset with a monitor are untested on both. Signed-off-by: Satya Benson <satya@benson.earth>
|
Claude Opus 5.5 on @satchlj's behalf. @RyanTheTide, thanks for the J615 row. It showed the T8112-only check missed your T8122 dcpext, and that both have the same layout. What changed (new commit 91f7e00, no force push). The check no longer uses a compatible. A dcpext on firmware 27 gets the DPTX controller on 0x24 and its ports on 0x2a when its RTKit endpoint map advertises both of those (
T8112 side. The outcome is the same as on b7fbee4, which Satya measured on phellos (J413, 27.2): the controller on 0x24, both Untested on our side: hotplug and modeset with a sink, on either USB-C port. Host tests (macOS host):
🤖 Generated with Claude Code |
|
J773g row (M4 Mac mini, T8132), macOS 27.2 (26B123) stub, dcpext0 driving the HDMI port: pass, with one extra line on the J773g side.
Why the J773g needs a line beyond this PR: the selector keys on
So #2634 sets 🤖 Generated with Claude Code |
|
J615 (15" M3 Air, T8122, macOS 27.2 firmware) boot-only row for head 91f7e00: PASS, no monitor attached.
So choosing the endpoints from what the firmware advertises covers the T8122 dcpext without a SoC check. Modeset/HPD still needs a monitor on the J615 (pending). Assisted-by: LLM (Claude:Opus 5.5) |
|
Blockers: 1. Every commit in the series (1bebd9d, 62e3c55, bae89ec, e42bffd, b7fbee4, 91f7e00) carries a Introduced interfaces a downstream PR may depend on:
|
…odes alone The gate that hands a T8132 dcpext on the 27.2 image its Type-C routes, its PIODMA child and its display DART in the display subsystem's iommus was reached only through apple_t8132_firmware_path(), which on 27.2 is a check for the J713 or J715 machine. Another T8132 board with Type-C routes and the same handoff never had its routes enabled. The gate already selects every dcpext it touches by its nodes: an available apple,t8132-dcpext admitted on the 27.2 image (apple_t8132_dcpext_v27_2()), with typec-routes children, its text, data and heap apple,asc-mem regions, and an enabled display subsystem. Run it on every machine, after the SoC's own gate, so that it appends to whatever iommus that gate set. A 27.2 J773g dcpext0 has no Type-C routes and keeps its HDMI chain; a tree without the T8132 display subsystem returns at once. While at it, fix the iommus append the review pointed at: a display DART the subsystem already names is not added a second time, the stream ID is the one the subsystem uses on its own display DART (its first iommus entry) instead of a literal 0, and the new property is freed when the changeset update fails. Merge order: this series drives a monitor only on top of #2526 (its DPTX endpoint layout, dcp_v27_dptx_layout(), and the dcp->dcpext field) plus a one-line change that sets dcp->dcpext for a 27.2 T8132 dcpext. Without them the dcpext opens the default firmware-27 DPTX endpoint and times out. #2526 must land first; this branch then carries that line, which cannot be applied before #2526 because the field does not exist. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Review at 91f7e00 (adversarial pass; this is in the M4 Air's tip-based default). No blockers.
Rows on the M4 Air (J713, 27.2 stub, integration tip + the J713 PR heads incl. this one, one fleet cmdline):
Assisted-by: LLM (Claude:Opus 5.5) |
|
Claude Opus 5.5 on @satchlj's behalf. @RyanTheTide, I did the trailer-only rewrite you asked for. The new head is
|
91f7e00 to
67f853f
Compare
…13-dcpext/air-dcpext-272 The J713's 27.2 dcpexts need #2526's dcp->dcpext to choose their DPTX endpoints from what the firmware advertises. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Re-review at 67f853f: no blockers.
@DjDeveloperr this one only needs your verdict. Once it merges, linux#2673 becomes ready for review. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial review of head 67f853fb4c5fdee20475752ec3640083bdcdd61b (base integration/aurora, MERGEABLE/CLEAN, Host tests/host-tests green).
Code, Gating & Attribution Review — Clean
- Firmware-driven selection (§1):
drivers/gpu/drm/apple/iomfb.c:4496-4504:iomfb_start_rtkit()skipsREMOTE_ALLOC_ENDPOINTon firmware 27 only when!apple_rtkit_has_endpoint(dcp->rtk, REMOTE_ALLOC_ENDPOINT).drivers/gpu/drm/apple/dcp.c:4615-4627,4671:dcp_v27_dptx_layout()runs indcp_start()after RTKit wake and beforedptx_controller_init()/dptxep_init(), selectingDPTX_CONTROLLER_ENDPOINT(0x24) +DPTX_ENDPOINT(0x2a) for firmware-27dcp->dcpextonly when both endpoints are advertised anddcp->hw.dptx_endpointis unpinned. Mutates only the per-instancedcp->hwcopy and is idempotent across restarts.- Existing pinned layouts are preserved: T8142 (
DPTX_ENDPOINT), T6050 (DPTX_ENDPOINT_V2), and firmware-27 T6041 (DPTX_ENDPOINT_V2set in thefw_compat == DCP_FIRMWARE_V_27_0probe override atdcp.c:7187, keeping desktop 26.6 untouched).
- Error & teardown paths:
drivers/gpu/drm/apple/dptxep.c:1663-1668anddrivers/gpu/drm/apple/afk.c:1748only relax missing-announce / class-less init failure paths for firmware-27dcp->dcpext(service_namestays initialized tonameon-ENOENT).- If
dptx_controller_init()fails indcp_start(),dcp->dptx_controller_epis cleaned up viaafk_free()on unbind, andapple_drm_init_dcp()(apple_drv.c:1599-1607) continues bringing up the internal panel and remaining pipes.
- Host tests:
tools/asahi/dcp-v27-dptx-layout-tests.py(with 3 killed mutations) plus updates toiomfb-startup-tests.py,dcpext26-startup-tests.py, andedid.pypass in CI. - Attribution (§4): The trailer-only rewrite at
67f853fbcleanly removedCo-Authored-Byfrom all 6 commits; every commit carries human author/committer andSigned-off-by: Satya Benson <satya@benson.earth>only, and the PR body ends withAssisted-by: LLM (Anthropic:Claude Opus 5.5).
Non-Code Hold Remaining (Hardware Evidence §5)
While 67f853fb is tree-identical to 91f7e00f — which already has passing rows on J713 (M4 Air, 7 boots + DP-2 + s2idle), J773g (M4 Mac mini, HDMI 4K60), and J615 (M3 Air, boot-only without monitor) — the following hardware rows are still missing for §5 sign-off on this head:
- J413 (M2 Air, T8112, 27.2) boot on
67f853fb/91f7e00f: commit67f853fbitself notes the J413 runs were taken with the earlier compatible-keyedb7fbee48check, notdcp_v27_dptx_layout(). - External monitor hotplug/modeset on J413 or J615 (and full §5 regression bar:
0 SELinux denials,0 failed units,0 new kernel errorson J413/J615). - Regression boot on a pinned firmware-27 dcpext (T6050, T6041, or T8142): verifies both the new
DPTX_ENDPOINT_V2pins (dcp.c:7187,9838) and widenedafk.c:1748class-less init matching cause no regressions.
Non-Blocking Notes
- PR body staleness: The PR body's
## T8112 dcpext ports (b7fbee48)section still describes selection byapple,t8112-dcpextrather thandcp_v27_dptx_layout()'s advertised-endpoint check. - Controller timeout fallback (future fw-27 SoCs): Once
#1832admits firmware 27 on additional SoCs, if any unpinned dcpext advertises0x24and0x2awithout announcing a controller on0x24,dptx_controller_init()returning-ETIMEDOUTindcp_start()will fail that dcpext rather than warning and falling back to0x2c. Safe for internal panels (sinceapple_drm_init_dcp()continues), worth keeping in mind for follow-up.
Code, CI, and attribution are clean; posting a comment hold pending the remaining hardware rows on 67f853fb.
Assisted-by: LLM (Google:Gemini 4 Neon)
…15/t8122-dcp-27-2-standalone The T8122 27.2 DCP advertises no remote allocator endpoint. Without #2526 its IOMFB start fails on every 27.2 boot, so this branch carries it and can no longer land without it. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Claude Opus 5.5 on @satchlj's behalf Pinned firmware-27 dcpext regression boot on T6050 for #2526 at Machine. J775c (Mac Studio, M5 Max). Both DCPs are Build.
A normalized diff of every So on this pinned T6050 fw-27 dcpext we see no regression from #2526: the same endpoints come up, and HDMI modesets the same way. The PR's new advertised-endpoint selection for unpinned dcpexts isn't exercised here, because T6050 is pinned to |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Approving head 67f853fb4c5fdee20475752ec3640083bdcdd61b after @satchlj's J775c (T6050) A/B pinned fw-27 dcpext regression row landed on 67f853fb (0 regressions, identical endpoints and HDMI 2560x1440 modeset, 0 SELinux denials / failed units / new kernel errors).
With J713 (unpinned fw-27 dcpext + eDP + USB-C monitor + 3/3 s2idle + 3/3 warm reboots), J773g (HDMI 4K60), J615 (boot), and J775c (pinned fw-27 T6050 A/B regression) all green on tree 67f853fb/91f7e00f, plus clean code, host tests, and commit attribution, our earlier hardware-row hold is satisfied.
Non-blocking: the PR body's T8112 dcpext ports section can be refreshed to mention advertised-endpoint selection (dcp_v27_dptx_layout()), and a follow-up J413 row on post-merge tip is still welcome.
Assisted-by: LLM (Google:Gemini 4 Neon)
Claude Opus 5.5 on @satchlj's behalf.
drm/apple: on firmware 27, start the remote allocator endpoint only when the firmware advertises it.Why: firmware 27 lists the RTKit endpoints its application uses. The 27.2 DCP on T8112 (MacBook Air M2, J413) advertises IOMFB (0x37) and no remote allocator (0x2d). Starting the unadvertised endpoint fails, so the internal panel never comes up.
Selection: the firmware's own endpoint advertisement (
apple_rtkit_has_endpoint()). Firmware that advertises 0x2d is unchanged. No board or SoC is named.Testing
apple,t8112-dcphas been in phellos's default since 2026-11-18. With it, IOMFB startup, firmware-derived EDID, present, brightness and soft DPMS all work (internal panel at 2560x1664@60).T8112 dcpext ports (b7fbee4)
On firmware 27 the T8112 dcpext's DPTX ports are on DPTX_ENDPOINT (0x2a), behind the DPTX controller on 0x24, as on T8142's dcpext; DPTX_ENDPOINT_V2 (0x2c) is silent. Selected by
apple,t8112-dcpextwith firmware 27. On phellos, without a monitor: controller services on 0x24 and AppleDCPDPTXRemotePort units 0 and 1 on 0x2a are announced at boot, and the internal panel is unaffected. Untested: hotplug and modeset with a monitor. Details in the PR comment of 2026-11-20.Assisted-by: LLM (Anthropic:Claude Opus 5.5)