Repository navigation
drm/apple, soc: apple: external displays on the M4 MacBook Air (J713) over USB-C on macOS 27.2 - #2673
RyanTheTide wants to merge 27 commits into
Conversation
…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>
… 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>
…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>
…lt mode A USB-C monitor on the M4 MacBook Air enters DP alt mode (SVID 0xff01, pin assignment C/E) but gets no picture: phy-apple-atc logs 'DisplayPort is not available on this port: serving its USB only' and puts the port into USB2. The T8132 ATC PHY runs DP alt mode only on a port its board marks apple,dp-alt-mode; the J604 has it, the J713 never got it. Both J713 ports are wired for it (the ADT's dcpext0/1 dp-switch-ufp-port, the ATC display crossbars the tree already describes), and aura passes the PHYs their usb3-dp (AUX) calibration. Mark atcphy0 and atcphy1. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
On the macOS 27.2 stub iBoot leaves the J713's dcpext0 and dcpext1 running the internal DCP's 26B123 image, as on the J773g. Admit them in apple_t8132_dcpext_v27_2() so they run the firmware-27 backend as pipes of the internal display's DRM device. The desktop external profile (the LPDPTX PHY and HDMI converter) stays the J773g's alone (apple_t8132_dcpext_hdmi_v27_2()); the Air's dcpexts drive the USB-C routes, with the DPTX endpoints the firmware advertises. Every Air is on the T8132 firmware path, so apple-dart takes their firmware and display DARTs for borrowed 26.6.2 ones. When a 27.2 dcpext names them, give them the J773g dcpext's locked-root handling instead, as the internal display DARTs get on 27.2, and refuse one that is not locked. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…2 dcpexts their Type-C routes On 27.2 aura fills each J713 dcpext's firmware memory (text, data and heap placeholders, as on the J773g) and writes no apple,t8132-dcpext-firmware-ready, so the 26.6.2 route gate leaves its Type-C routes disabled. Add the placeholders, and a gate that, once the internal handoff has enabled the display subsystem, enables the Type-C routes and the PIODMA child (disabled in the SoC tree) of every dcpext handed over with the 27.2 image and adds its display DART (its PIODMA's) to the display subsystem's iommus, in one changeset. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Two board checks decide this path: The production form keys on the nodes: run the gate when the display-subsystem node is present and enabled, and admit the dcpext on its firmware image alone; a board whose display is not ready simply keeps those nodes disabled in its DTS. The test in |
… with its link On the M4 MacBook Air (J713) on macOS 27.2, a USB-C monitor's link training ran at every rate and lane count and never got past clock recovery: the monitor never asked for more than swing 0/pre-emphasis 0. The display crossbar's output stayed at 'clocks disabled' throughout. dcp_direct_crossbar_link() sends every firmware-27 pipe that is not a T6041 desktop dcpext to the T6050 path, which returns early for a processor without a fixed DP PHY. A 27.2 T8132 dcpext has the T8132 crossbar, which only routes on select and enables its clocks on link-up, as the M4 backend's T8132 dcpext does. Take that path for it too. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…ot the board The 27.2 dcpext path was chosen by board: apple_t8132_dcpext_v27_2() admitted the image on the J773g or the J713 only, its HDMI desktop profile on the J773g only, and the display gate's Type-C step ran on the J713 only. The J715 (same SoC and display block) and every later T8132 machine would silently take the old path until someone added its name. Each choice has a hardware identity next to it: - the dcpext runs the firmware-27 backend when the loader handed it over with the pinned 26B123 image and its 27.2 firmware compat; apple_t8132_dcpext_v27_2() now checks that alone. A board whose external display is not ready keeps the nodes disabled; - the HDMI desktop profile is the dcpext whose node describes a DP-to-HDMI converter on its fixed PHY (hdmi-hpd-gpios), as the J773g's dcpext0 does; - the gate's Type-C step runs for every such dcpext that has Type-C routes, once the display subsystem is enabled. The gate is only reached on the M4 firmware path, so the J773g on 27.2 keeps its own HDMI chain. The boot selftest drops its machine flags accordingly. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…e link
The firmware-27 link-up fix for the M4 Air's external display processors
picked the crossbar flow from the processor's compatible
("apple,t8132-dcpext"). Whether an output only routes on select and needs
the link-up for its clocks is a property of the crossbar, which its
driver already records (the T6030 flow, set for the T8132 and T6041
crossbars). Export that as apple_dpxbar_clocks_on_link() and let a
firmware-27 pipe take the link-up path when its direct Type-C route ends
on such an output. Fixed-PHY pipes, tunnels and the T8142-layout
crossbars keep the T6050 path, as before.
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Both board checks are gone in c251b0e:
8a08335 also replaces the Tested on the J713 (stock cmdline, MSI monitor on port 1) with exactly this series on the J713 lab base: gate enabled for both dcpexts, all four external DARTs keep their locked roots, DP-2 connected at boot with its 2560x1440@280 mode, 0 faults. Host suite 89/89, W=1 clean. Assisted-by: LLM (Claude:Opus 5.5) |
|
Blockers: 3.
Smaller: the display iommus append does not check for an existing entry and hard-codes SID 0 (display-gate.c:3529-3558); prop/value leak if the changeset update or apply fails. The crossbar change looks right: apple_dpxbar_clocks_on_link() is false for T6050/T8142 crossbars, and fixed-PHY pipes keep their paths. Rows still needed: the rebased stack as it will merge, a J713 26.6.2 boot (with and without the external handoff), a J773g 27.2 boot of this series with HDMI unchanged, and the second port, two monitors and a physical replug already listed. |
|
Host-test result at 8a08335: |
…xt/air-dcpext-272 #2596 now carries #2590's 2a3bb37, which keys a 27.2 internal display DART on its processor's handoff and folds the internal and external DART checks into one helper, apple_dart_serves_v27_dcp(dart, compatible, predicate). Resolve: - include/linux/soc/apple/t8132.h: apple_t8132_internal_dcp_v27_2() is gone at the base; keep this branch's comment on apple_t8132_dcpext_v27_2() and apple_t8132_dcpext_hdmi_v27_2(). - boot.py: keep this branch's comments, which name both boards. - apple-dart.c: this branch's apple_dart_serves_t8132_dcpext_v27() call becomes apple_dart_serves_v27_dcp(np, "apple,t8132-dcpext", apple_t8132_dcpext_v27_2), the same body. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…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>
… one unlocked policy A DART that an available T8132 dcpext on the 27.2 image names (its own iommus or its PIODMA's) was first classified as one of an Air's borrowed 26.6.2 external DARTs, from the T8132 firmware path, which on 27.2 is a check for the J713 or J715 machine, and four fixed register addresses. Only then was it moved to the 27.2 handling, with a separate flag that refused an unlocked DART on an Air while any other board let it through. Decide "serves a 27.2 dcpext" first, by apple_dart_serves_v27_dcp() alone, and keep such a DART out of the borrowed classification. Every board then takes the same path: a locked DART keeps its firmware's roots (fw_mirror) and an unlocked one is refused and logged as an error, as the internal 27.2 display DARTs are. This also changes the J773g: its dcpext0 DARTs were always handed over locked on 27.2, and an unlocked one is now refused there as well instead of taking the plain path. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…rrowed DCP path t8132-j713.dts gives dcpext0 and dcpext1 disabled text, data and heap placeholder regions for the 27.2 handoff, which replaces memory-region. The 26.6.2 boot loader instead appends its own regions after them, and the borrowed path walked every entry: apple_dart_dcp_leaf_regions() refused a placeholder for having no reservation and apple_dart_dcp_validate() for having no iommu-addresses, so a J713 on 26.6.2 with the external handoff armed lost both dcpexts. A disabled reserved-memory node reserves nothing. Read the entries through apple_dart_dcp_region(), which returns NULL for a disabled one, and skip it in both walks. A phandle that resolves to no node, an enabled entry without its reservation or without no-map, and a list with no enabled entry are refused as before. tools/asahi/apple-dart-dcp-placeholder-tests.py replays the production walk with the placeholders before and after the loader's regions, the refusal controls, and a mutant that walks the placeholders again. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…answer dcp_direct_crossbar_link() now asks dcp_typec_xbar_clocks_on_link() whether a firmware-27 Type-C route ends on a crossbar output whose clocks follow the link, but the test extracted only the former, so its unit no longer compiled. Extract the helper too, with apple_dpxbar_clocks_on_link() behind a mocked symbol_get(). On firmware 27 an output that answers true is linked on any machine and processor, with the selected output asked and taken down again without asking; one that answers false, a missing crossbar module and a tunnel keep the T6050 PHY path. A new mutant, --drop-on-link, drops the answer from the family gate and must fail. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Pushed 5821d0e..3f8a2cc on top of 8a08335 (fast-forward, no force push) for the review points:
Testing:
Still to run: J713 on 26.6.2 with and without the external handoff armed; J773g on 27.2; the second USB-C port, two monitors and a physical replug. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial review of head 3f8a2ccbdc4665cdef0afafcceb25b3e1afca1a2 (base j713-disp2/dcp272-j773g-dcpext, 6/6 CI green, non-draft).
The earlier review fixes (5821d0e7..3f8a2ccb) properly eliminated the board checks in t8132.h, apple-dart.c, display-gate.c, and dcp-fabric.c, moved the crossbar link-up check onto apple_dpxbar_clocks_on_link(), fixed disabled placeholder handling in apple-dart-dcp.h, and restored host-test coverage. Attribution (human Signed-off-by only across all 12 commits; PR body Assisted-by footer) and clean-room rules pass.
Three blockers remain before this can be approved/merged:
Blockers
-
Missing
nomodesetand DRM config guards ingate_t8132_dcpext_v27()breaks USB-C on recovery/no-DRM boots (drivers/soc/apple/display-gate.c:3561-3624)gate_t8132_dcpext_v27()enablestypec-routes/route@0androute@1(status = "okay") without checkingIS_ENABLED(CONFIG_VIDEO) && video_firmware_drivers_only()orIS_ENABLED(CONFIG_DRM_APPLE) && IS_ENABLED(CONFIG_DRM_APPLE_DCP_T8132).- On a
nomodesetboot,appledrm_register()(drivers/gpu/drm/apple/apple_drv.c:2122-2125) returns-ENODEVbeforedcp_register()(and withCONFIG_DRM_APPLE_DCP_T8132=n,dcp.c:10004compiles out the T8132 match entry). Leavingtypec-routesenabled withoutapple-dcpprobing causes the Type-C port controllers (sn201202x) to wait indefinitely for mode-switch devices that never register, taking down USB on both ports—the exact failure mode guarded against ingate_t8122_dcpext()(drivers/soc/apple/display-gate.c:2052-2060),gate_t6041_max_run()(:3303), andgate_t8132_j773g_run()(:3696). - Add both guards at the top of
gate_t8132_dcpext_v27().
-
Stack and missing runtime dependency (
#2526+dcp->dcpextwiring) (drivers/gpu/drm/apple/dcp.c:7134-7140)- Base branch is
j713-disp2/dcp272-j773g-dcpext(#2596->#2590->#2541, where#2541is still draft withUNSTABLECI), notintegration/aurora. - Even after
#2541 -> #2590 -> #2596land, this branch cannot drive a monitor on its own:apple_dcp_hw_t8132_dcpext_v27sets no.dptx_endpoint/.dptx_controller, and the branch lacks#2526(dcp_v27_dptx_layout()/dcp->dcpext) as well as the line settingdcp->dcpextfor 27.2apple,t8132-dcpext(currently only in draft#2634). Merging as-is would havedisplay-gateenable the Type-C routes and append the DARTs whiledcpext0/1time out on"port 0 service not announced". - Keep this PR draft (or stack on
#2526+ carry thedcp->dcpextwiring) until the runtime dependency is in its ancestry and re-tested on the exact merge tree.
- Base branch is
-
Missing required hardware evidence and §5 regression bar
- J713 on macOS 26.6.2 (with and without external handoff armed): required to verify
arch/arm64/boot/dts/apple/t8132-j713.dts:341-395+drivers/iommu/apple-dart-dcp.h:412-463,1112-1116do not regress 26.6.2. - J773g on macOS 27.2 (HDMI unchanged): required because
c104964echanges J773g'sapple-dart.c:5542-5553,6067-6075policy (refuses unlocked external display DARTs and setsfw_live_prot),drivers/gpu/drm/apple/dcp.c:523switches desktop-external detection tohdmi-hpd-gpios, anddrivers/soc/apple/display-gate.c:3788now runsgate_t8132_dcpext_v27()aftergate_t8132_j773g_run(). - §5 regression bar on current head
3f8a2ccb: the latest J713 27.2 run does not report0 SELinux AVC denials,0 failed systemd units, and0 new kernel errors(and was run on a combined lab kernel rather than the exact PR stack). Also notedcpext1/ second port, dual-monitor, and physical unplug/replug are still pending.
- J713 on macOS 26.6.2 (with and without external handoff armed): required to verify
Non-blocking notes
drivers/soc/apple/display-gate.c:3497-3533(gate_t8132_v27_display_iommus()): the loop exits on any error fromof_parse_phandle_with_args()without checkingof_count_phandle_with_args(display, "iommus", "#iommu-cells") == nror thatold_len == 2 * nr * sizeof(*value)beforememcpy()at:3532. A malformed trailing entry would be silently truncated instead of returning-EINVAL(comparegate_iommus_append()atdisplay-gate.c:1470-1479).drivers/soc/apple/display-gate.c:3414,3432,3446,3583,3588,3617,3619: helper names (gate_j713_v27_*) and log prefix (apple-j713-display:) still sayj713now that the gate is generic across T8132 boards.arch/arm64/boot/dts/apple/t8132-j713-j715.dtsi:177-178,230-231: comments ("The ATC PHYs have no DP alt mode") are now stale for J713.
Assisted-by: LLM (Google:Gemini 4 Neon)
…he display driver gate_t8132_dcpext_v27() enables the Type-C routes of every handed-over 27.2 T8132 dcpext and appends its display DART to the display subsystem. An enabled route makes the Type-C port controllers wait for the mode switches of the display driver. On a nomodeset boot appledrm_register() returns -ENODEV before the DCP driver registers, and without CONFIG_DRM_APPLE_DCP_T8132 the T8132 match entries are not built: the mode-switch devices never register, and USB is lost on both ports. Return early in both cases, before the changeset is built, exactly as gate_t8122_dcpext() does for the J613 and gate_t8132_j773g_run() for nomodeset: the routes stay disabled as the device tree has them, and the display subsystem's iommus are left as they are. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
…8132 27.2 gate_t8132_v27_display_iommus() counted the display subsystem's iommus entries until of_parse_phandle_with_args() first failed, then copied that many from the property. A malformed entry after valid ones ended the walk early, and the rewritten property silently dropped it and everything after it. As gate_iommus_append() does, require of_count_phandle_with_args() to see the same number of entries and the property to be exactly two cells per entry before copying it, and return -EINVAL otherwise, so the changeset is not applied and the routes stay disabled. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
… T8132 gate_t8132_dcpext_v27() is selected by its nodes alone on any T8132 board, but its helpers were still named gate_j713_v27_*() and its messages started with "apple-j713-display:". Rename the helpers to gate_t8132_v27_*() and the prefix of the 27.2 messages to "apple-t8132-display:". Nothing else in the tree refers to either. The 26.6 path, gate_j713_dcpext_routes(), keeps its name and prefix. No functional change. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The comments on dcpext0's and dcpext1's Type-C routes still said the ATC PHYs have no DP alt mode and that the routes only carry DisplayPort tunnels. Since t8132-j713.dts marks both J713 PHYs apple,dp-alt-mode, the J713 routes carry DP alt mode too; a port without the mark still refuses it. Say so, and name both ways the display gate learns that the boot loader handed a dcpext over (26.6.2 and 27.2). Comment-only change. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Thanks. Pushed 2adca3a..df414c4 on top of 3f8a2cc (fast-forward):
Non-blocking notes:
Tests: apple-dcp 89/89, dcpext 23/23, apple-dart 12/12, t6030-pmp-supplier 2/2. W=1 is clean on display-gate.o. checkpatch --strict reports 0/0/0 on the four commits. |
…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>
On the Mac mini (J773g) on macOS 27.2, dcpext0 booted on the firmware-27 backend, but dptxep_init() opened firmware 27's default DPTX_ENDPOINT_V2 (0x2c), where nothing is announced: "DPTX transport ready but port 0 service not announced" (-110), then "dptx service for port 0 not enabled" on every connect, and no modes. Its 27.2 image serves AppleDCPDPTXController (dcpav- and dcpdp-controller-epic, units 0 and 1) on DPTX_CONTROLLER_ENDPOINT (0x24) and AppleDCPDPTXRemotePort (dcpdptx-port-epic, units 0 and 1) on DPTX_ENDPOINT (0x2a), the services macOS 27.2 opens on the mini's dispext0, and the layout dcp_v27_dptx_layout() selects for a firmware-27 dcpext whose firmware advertises both endpoints. That selection, the class-less announce and the late port announce key on dcp->dcpext, which comes from the "apple,dcpext" compatible. The T8132 dcpext nodes have none: on the M4 firmware they are adopted outside the DRM device (dcp_platform_probe_t8132_ext()), and with the generic compatible, a kernel without CONFIG_DRM_APPLE_DCP_T8132 would bind them as a plain dcpext. So where a T8132 dcpext is admitted on firmware 27 and becomes an ordinary pipe, set dcp->dcpext. No endpoint is named in its hardware data. Signed-off-by: Diljit Singh <hey@djdev.me> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The T8132 dcpext nodes carry no apple,dcpext fallback, so the layout selector only reaches them through the probe's firmware-27 T8132 dcpext block. Check that this block sets dcp->dcpext and that the T8132 firmware-27 hardware data names no DPTX endpoint, so the endpoints come from the firmware's advertisement as on the other 27.2 dcpexts. Dropping the dcpext line fails the test. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Pushed df414c4..5c0d534 (fast-forward, no force push):
Host suite 444/444 at 5c0d534. W=1 build of drivers/gpu/drm/apple/ is clean, apart from one pre-existing kernel-doc warning at dcp.c:790 that is also on the tip. Still draft: the base stack (#2541 -> #2590 -> #2596) has to land first, and there's no J713 row on exactly this head yet. The J713 default runs the equivalent line, and its next build takes this head. |
… order The dcpext field's comment still said apple,dcpext only, but a T8132 dcpext running firmware 27 is a dcpext without that compatible. Name both. dcp-v27-dptx-layout-tests.py now also checks that the T8132 firmware-27 block comes after the compatible-based assignment, which would otherwise clear the flag again. Moving the generic line below the block fails the test. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Pushed 5c0d534..6b567dc for two review nits: the |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial re-review of head 6b567dcee9958cba2d6b0addfab3f596e83633ec (draft, base j713-disp2/dcp272-j773g-dcpext, 6/6 SEP source checks green).
Prior Review Findings — All Code Items Resolved
- Missing
nomodeset/ DRM config guards ingate_t8132_dcpext_v27()(fixed in2adca3ae):drivers/soc/apple/display-gate.c:3586-3594now returns early before allocating/applying a changeset when!IS_ENABLED(CONFIG_DRM_APPLE) || !IS_ENABLED(CONFIG_DRM_APPLE_DCP_T8132)orIS_ENABLED(CONFIG_VIDEO) && video_firmware_drivers_only(), preventing USB-C loss onnomodeset/ no-T8132-DRM boots. - Runtime dependency (
#2526+#2634dcp->dcpextwiring) (fixed in9cf8a64f,33dd344b,5c0d534b,6b567dce):9cf8a64fmerges#2526at its trailer-clean head67f853fb.33dd344bcarries Diljit's commit from#2634(6f2f4d83) with identical code, preserved authorship (Diljit Singh <hey@djdev.me>), agent co-author dropped, and Ryan'sSigned-off-byadded.5c0d534band6b567dceupdate thedcp->dcpextcomment and add assertions intools/asahi/dcp-v27-dptx-layout-tests.pyverifying both thatapple,t8132-dcpextsetsdcp->dcpext = trueafter the generic compatible assignment and thatapple_dcp_hw_t8132_dcpext_v27names no.dptx_endpoint.
- All three prior non-blocking notes resolved:
0ee71bf8checks entry count andold->lengthingate_t8132_v27_display_iommus(),27f8b1dbrenames helpers/log prefix togate_t8132_v27_*/apple-t8132-display:, anddf414c49updates the stale comments int8132-j713-j715.dtsi. - Attribution & gating (§1/§4): All 26 commits carry human
Signed-off-byonly (zero agent trailers); PR body hasAssisted-by: LLM (Claude:Opus 5.5). No board/model/firmware-version gates remain.
Non-Code Holds Remaining (Keeping Hold via Comment — Cannot Approve Yet)
- Open stack dependencies & draft status: Base branch
j713-disp2/dcp272-j773g-dcpext(#2596->#2590->#2541, where#2541CI is still pending) and merged#2526(67f853fb) are all stillOPEN. Once#2541 -> #2590 -> #2596and#2526land, retarget ontointegration/auroraand mark ready so GitHub Actions also runsHost tests/host-testsandDevice tree checks/dt-checks(neither ran against the non-default base, though localrun-host-tests.pypassed 444/444 at5c0d534b). - Required hardware evidence (§5) on current head
6b567dce:- J713 on macOS 27.2 (exact head
6b567dce): fresh boot with §5 regression bar (0 SELinux denials,0 failed units,0 new kernel errors); ideally also confirmnomodesetkeeps USB-C alive. - J713 on macOS 26.6.2 (with and without external handoff armed): verify
t8132-j713.dtsplaceholders +apple-dart-dcp.hdisabled-placeholder skip do not regress 26.6.2. - J773g on macOS 27.2 (HDMI unchanged): verify uniform unlocked-DART refusal (
apple-dart.c:6071-6075),hdmi-hpd-gpiosdesktop-external selection (dcp.c:523), and unconditionalgate_t8132_dcpext_v27()(display-gate.c:3812) leave J773g HDMI intact. - Note: second USB-C port (
dcpext1), dual monitors, and physical unplug/replug also remain pending.
- J713 on macOS 27.2 (exact head
Minor Doc Nit
- The PR body's
<details>reviewer detail section still reflects pre-935b94c0/c104964ecode (stating the gate is reached only underapple_t8132_firmware_path()and referencingapple_dart_serves_t8132_dcpext_v27()/j713_dcpext_v27).
Code is clean; ready to approve once the stack lands, full CI runs on integration/aurora, and the pending hardware rows are posted on the final head.
Assisted-by: LLM (Google:Gemini 4 Neon)
…xt/air-dcpext-272 #2541 (now 1c70a92) derives the J773g's fixed-DP chain from its phandles (gate_t8132_run(), machine apple,t8132) and drops the J773g node list. Keep the Air's 27.2 Type-C dcpext gate as it is: the Airs return from apple_display_gate_soc() after the 26.6.2 routes before gate_socs[] is walked, and gate_t8132_dcpext_v27() appends their display DARTs after whatever the SoC gate left. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org> # Conflicts: # drivers/soc/apple/display-gate.c
|
The code review is clear, but the stack under it changed: #2541 was rebased onto integration/aurora, and #2596, whose DART helper this uses, is back in draft to stop keying on one firmware build. This needs rebuilding on the reworked #2590 and #2596 (and #2634, which it carries), then a retarget onto integration/aurora for CI, the J713 rows on 27.2 and 26.6.2 and a J773g HDMI row on the final head. |
Problem
A USB-C monitor on the 13-inch M4 MacBook Air (J713) enters DisplayPort alt mode and shows nothing. phy-apple-atc logs "DisplayPort is not available on this port: serving its USB only", because the J713 device tree never marked its ATC PHYs
apple,dp-alt-mode(the J604's are marked). Behind that there's a second gap. On the macOS 27.2 stub, iBoot leaves dcpext0 and dcpext1 running the same pinned 26B123 image as on the J773g, but nothing admits them on the Air. Also, apple-dart takes their DARTs for borrowed 26.6.2 ones, becauseapple_t8132_firmware_path()is true on every Air.Change
apple_t8132_dcpext_v27_2()admits a T8132 dcpext on what the loader handed over (the processor, the pinned 26B123 image and its 27.2 compat), on any board. The desktop HDMI profile is the dcpext whose node describes a DP-to-HDMI converter on its fixed PHY (hdmi-hpd-gpios, the J773g's dcpext0), so the Air's dcpexts drive their Type-C routes.apple_dpxbar_clocks_on_link()) brings that output up on link-up. It used to fall into the T6050 path, which returns early without a fixed DP PHY, so link training never got past clock recovery.Stacked on #2596 (which sits on #2590 and #2541). The DPTX endpoints come from #2526, which this branch now merges at its trailer-clean head 67f853f. The T8132 dcpext nodes have no
apple,dcpextfallback, so the branch also carries Diljit's commit from #2634 that marks a firmware-27 T8132 dcpext as a dcpext at probe. It's keyed on the firmware and the block compatible, not on a board. On the boot loader side it needs aurora-silicon/aura#440, which hands the M4 external display processors over from the ADT. Without it, the dcpexts are refused exactly as they are today.Testing
tools/asahi/run-host-tests.py444/444, including a newdcp-v27-dptx-layout-tests.pycheck that fails if a firmware-27 T8132 dcpext is not a dcpext; W=1 clean on drivers/gpu/drm/apple/. Earlier: apple-dcp host suite 89/89 (boot.py covers the T8132 admission without machine flags), W=1 clean on display-gate.o, dcp-fabric.o, dcp.o, apple_drv.o, apple-dart.o, apple-display-crossbar.o and the J713/J773g DTBs.dcp->dcpextline; Stage 2 = the aura lab branch. The display is now part of the J713 lab default.Still to run
dcp->dcpextline keyed onapple_t8132_dcpext_v27_2(); on the J713 both keys select the same two processors. The next default build takes this head instead.dpavservep_init()opens the DCPAV service on 0x28 whiledcpavserv_identity()accepts a wire-v2 service only on 0x2a, so its admission always fails there. The EDID still comes from the sink metadata path; that's for a follow-up.Reviewer detail
apple_t8132_dcpext_v27_2()no longer lists J773g/J713;apple_t8132_dcpext_hdmi_v27_2()keys onhdmi-hpd-gpios; the display gate's Type-C step no longer checksapple,j713. The gate is only reached on the M4 firmware path (apple_t8132_firmware_path()), so the J773g on 27.2 keeps its own HDMI chain (gate_t8132_j773g_run()), and the Type-C step skips dcpexts withouttypec-routeschildren. The J715 (same board design) takes the same path once its tree has the nodes.dcp_typec_xbar_clocks_on_link()asks the active direct route's crossbar output (route->active_xbar ?: route->xbar); an output brought up on that path (direct_xbar_up) is taken down the same way. Fixed-PHY pipes (no active Type-C route), tunnels and T8142-layout crossbars (T6050) keep the T6050 path. No chip or board check.apple_dart_probe():j713_dcpext/j713_dispext(borrowed, firmware-path based) are cleared whenapple_dart_serves_t8132_dcpext_v27()matches.t8132_dcpext_v27then selects fw_mirror, andj713_dcpext_v27 && !fw_mirrorreturns -EINVAL, as the internalj713_display_v27case does.apple,asc-memnodes. The boot loader points text at the internal handoff's shared asc-firmware node and may append more regions after them.27.2: Type-C routes and display DARTs enabled for 2 dcpext(s),T8132 external display DART on the 27.2 image: locked roots kept (mirror)x4,firmware 27: DPTX controller on 0x24, ports on 0x2a (advertised)x2,allocated Type-C DPTX PHY 1.Assisted-by: LLM (Claude:Opus 5.5)