Repository navigation
drm/apple, soc: apple: drive the M3 Air (T8122) internal display on macOS 27.2 - #2580
RyanTheTide wants to merge 13 commits into
Conversation
The Mac mini (J773g) on macOS 27.2 (26B123) runs one DCP image, UUID B3BA603C-3CA7-3E21-B393-44EB20BD2AEF, on dcp, dcpext0 and dcpext1 (its 27.2 ADT; the three share __TEXT). Its external processors are to be driven through the firmware-27 backend as the T6041's 27.2 ones are, so the display gate and the DCP driver need the same pinned admission the T6041 helpers give: the image UUID, firmware version and compatibility 27.2.0. Split the T6041 check into apple_dcp_image_v27_2(), which takes the image UUID, and add apple_t8132_dcpext_v27_2() for a J773g dcpext. It is limited to the J773g until another T8132 board's 27.2 trace shows the same interface. apple_t8132_dcpext_v27_2() is in linux/soc/apple/t8132.h, with the other T8132 board helpers: its machine check stays out of display.h, whose T6041 helpers key on the processor and its image alone (the apple-dcp boot selftest builds them with no of_machine_is_compatible()). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diljit Singh <hey@djdev.me>
The M4 backend (iomfb_m4.c, t8132_ext_drm.c) adopts T8132 display processors on the 26.6.2 firmware path. The Mac mini's device tree is also booted on macOS 27.2 firmware, where the boot loader leaves the main DCP running idle and hands it to nobody, and where dcpext0 is to run the firmware-27 backend instead. Make the M4 paths say so: - dcp_check_firmware_version() refuses an M4 hw-data DCP off apple_t8132_firmware_path(), before the probe claims its IOMMU domain. iomfb_m4_init() refused such firmware already, but only later. - apple_dcp_usable() leaves the main T8132 DCP out of the DRM device's components off that path, so a device tree that enables it (as the 26.6.2 HDMI work does) does not hold the DRM device up waiting for it. - dcp_is_t8132_ext() and the probe, remove and shutdown dispatch match only an M4-adopted dcpext (dcp_t8132_ext_m4_node()): a J773g dcpext with the 27.2 image (apple_t8132_dcpext_v27_2()) is neither routed through dcp_platform_probe_t8132_ext() nor caught by the T8132 Type-C, crossbar and tunnel special cases of the fabric and the DPTX service. Nothing changes on the Airs (any firmware) or on any T8132 Mac on 26.6.2. The host replays that extract dcp_is_t8132_ext() (tiled-split, dcpext26-crossbar-union) take the new helper with it; the crossbar one also checks that a J773g 27.2 dcpext takes the T6041 firmware-27 link. The apple-dcp boot selftest checks the gate both ways: a T8132 processor of the M4 backend is the M4 backend's on its firmware path, and nobody's off it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diljit Singh <hey@djdev.me>
…able On macOS 27.2 (26B123) the Mac mini's (J773g) external display processors run the same image as its main DCP (UUID B3BA603C), and aura hands them over the way it hands over the M4 Max Mac Studio's (J575c): firmware memory in text/data/heap regions, apple,firmware-version and -compat 27.2.0, the image UUID, and the dispextN provider clocks. Admit such a dcpext the way the T6041 27.2 dcpext is admitted: - dcp_check_firmware_version() returns firmware 27 for it, with the 27.2 method table, before the M4 hw data is looked at. That the T8132 26B123 image numbers its IOMFB methods as the T6041 and T8142 26B123 images do is assumed, not traced; the comment says so. The method table check is now one helper, dcp_v27_method_table(), shared with the existing firmware-27 and T6041 cases. - It gets apple_dcp_hw_t8132_dcpext_v27, whichever hw data its compatible matched: firmware_dma_bits 41 (the firmware DART window, 1 TiB + 64 GiB, ADT dart-dcpext0 vm-base and vm-size-23), num_dptx_ports 2, adopt_live_session (iBoot leaves it running, pre-loaded = running = 1) and sink_metadata_edid, as T6041's dcpext gets on 27.2. No sleep support. - It is a failsafe external processor and a component of the DRM device (apple_dcp_id_tbl, apple_dcp_usable()), unlike an M4-adopted dcpext. The apple-dcp boot selftest (t6041-v27-admission) now also builds dcp_v27_method_table() and the real apple_t8132_dcpext_v27_2(), with its machine check as a flag. It checks: - the J773g dcpext with the T8132 27.2 image runs the 27.2 table, on and off the M4 path; - another M4 Mac's dcpext does not; - the main DCP, the T6041 image, a missing or second UUID, and other releases are refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diljit Singh <hey@djdev.me>
The T8132 device trees describe the PMC window that holds a DCP's realtime bandwidth request slot as its last display window (disp-4, as the ADT's dispN reg[4]), and apple,bw-scratch names that window's index with the slot's node (dcpext0: 0x38282c000, 0x2c000 into it). The M4 backend reads it that way. The common path (dcp_get_disp_regs(), used by the firmware-27 backend) only accepted a slot as a window of its own right after the disp-N ones, so a firmware-27 T8132 dcpext failed to bind with "Unexpected disp_reg value in 'apple,bw-scratch': 4". Accept a slot whose index names an existing window when the slot lies inside it: no window is added, and the scratch offset is taken relative to that window, so map_reg hands the firmware the window it expects at index 4 and the D003 reply carries the slot's address. Trees that already worked are unchanged; they never named an existing index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diljit Singh <hey@djdev.me>
macOS 27.2 drives the Mac mini's HDMI port from DCPEXT0 alone (4K60
without DSC, 4K120 with DSC, FRL on the PS190 converter): the LPDPTX PHY
with source select = dcpext0's dcp-index 1, the converter's rails on SMC
GPIOs 15 (hdmi_pwr_en) and 26 (dp2hdmi_pwr_en), and no Type-C crossbar
route. That is the M4 Max Mac Studio's (J575c) HDMI port: the same
converter, rails and LPDPTX PHY ("dptx-phy,t8132" in both ADTs), which
its T6041 dcpext0 drives on 27.2 as a desktop external processor.
Make the J773g's firmware-27 dcpext a desktop external processor too
(dcp->desktop_external, now the one test dcp_desktop_external() reads),
so it takes the J575c's fixed-port path rather than porting the M4
backend's (dcp_t8132_fixed_hdmi on 26.6.2):
- its fixed dp-phy is initialised and powered at probe
(dcp_desktop_probe_routes()), and the converter rails get their
100 ms before the DCP asks for the link;
- a direct crossbar link request takes the T6041 path, not the T6050
crossbar one (dcp_direct_crossbar_link()); with no crossbar or route
described it has nothing to do.
The HPD line, the rails, the PHY and the connector type come from the
device tree, as on J575c.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Diljit Singh <hey@djdev.me>
The Mac mini (J773g) drives its HDMI port through the T8132's own LPDPTX
PHY (ADT /arm-io/dptx-phy, "dptx-phy,t8132", crossbar dfp-endpoint 4).
The M4 Max Mac Studio's HDMI PHY is the same block ("dptx-phy,t8132" in
its ADT too) and is described as the T6050 layout with the ADT's PLL
calibration. Allow apple,t8132-dptx-phy with the same fallback, and the
calibration's sixth value, RODCOROLEAKCOMP, which the driver reads
(apple,pll-rodcoroleakcomp) and the mini's ADT sets (0), where the
Studio's leaves it unset.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Diljit Singh <hey@djdev.me>
On macOS 27.2 the Mac mini (J773g) is off the M4 26.6.2 firmware path, so the display gate did nothing for it. aura hands it over as it hands over the M4 Max Mac Studio (J575c): dcpext0's (and dcpext1's) firmware memory and firmware clocks, the main DCP left running idle, and the display subsystem and its DART enabled on iBoot's boot framebuffer, with every dcpext node left disabled for this gate. Add a J773g gate that does what gate_t6041_max_run() does for the J575c's HDMI chain: once dcpext0 has its firmware memory, the display subsystem is enabled and the image is the pinned 27.2 one (apple_t8132_dcpext_v27_2()), enable the LPDPTX PHY, dcpext0's firmware and display DARTs, its mailbox, its PIODMA child and dcpext0 in one changeset. A chain that is not all there and disabled is left alone, as there. It runs only off the M4 firmware path; on 26.6.2 the J713 dcpext route handling runs instead, unchanged. One difference from the J575c: the display subsystem's iommus become dispext0's DART rather than having it appended. The main pipe's display DART (disp0) belongs to the running main DCP, which nothing hands over on this firmware and which apple-dart never probes there; left in the iommus it would hold the display subsystem's probe forever. The main DCP's own nodes are left as the device tree has them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diljit Singh <hey@djdev.me>
… 27.2 On macOS 27.2 the Mac mini drives its HDMI port from DCPEXT0 alone, through the LPDPTX PHY (source select = dcpext0's dcp-index 1) and the PS190 DP-to-HDMI converter, whose rails are SMC GPIOs 15 and 26. It is the M4 Max Mac Studio's HDMI port, so describe it in the J575c's style (t6041-j575c-hdmi.dtsi), from the mini's 27.2 ADT: - dcpext0's firmware memory as three disabled apple,asc-mem placeholders named text, data and heap, for aura to fill; - the PHY (ADT /arm-io/dptx-phy, "dptx-phy,t8132", core and dptx banks at 0x39a700000/0x39a740000) in the T6050 layout with the ADT's PLL calibration, crossbar ufp-endpoint 0 (dispext0), disabled; - dcpext0 as an HDMI-A port: that PHY at crossbar output 4, hdmi_hpd on AOP GPIO 41, hdmi_pwr_en and dp2hdmi_pwr_en on SMC gP0f and gP1a; - no power domain on dcpext0, its mailbox and DARTs: no PMP runs off the M4 firmware path and iBoot leaves DISPEXT0 powered, as on the J575c (and as the 26.6.2 HDMI work found for this pipe). - DISPEXT0_FE always on: only the boot framebuffer holds it (and DISPEXT0_SYS through it), so once the display driver removes that, genpd would power the front end off under the running dcpext0. The T8132 PMGR driver leaves its auto-enable bits alone either way. Everything stays disabled: the display gate enables the chain on 27.2. The main DCP, its DARTs and the display subsystem are left as they were, so a 26.6.2 boot, whose main-DCP HDMI path enables them from the board tree, keeps them. On 26.6.2 the M4 PMGR policy still decides whether DISPEXT0_FE is Linux's at all; always-on only applies where it is and the policy does not give it to the firmware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Diljit Singh <hey@djdev.me>
…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. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…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. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On the macOS 27.2 (26B123) system firmware the boot loader passes the T8122 PMP values with tunable-uuid C6CCB960-AC83-34A2-9493-C3131BD5AE4B, the PMP image of that release. The gate takes only the 14.x image (3B18C886-...), so on a 27.2 MacBook Air (J613/J615) it stops with "PMP not added: this Mac's PMP firmware image is C6CCB960-..." and the internal display stays on the boot framebuffer. Take the 27.2 image as well. The PMP description is the device tree's own and the soc-device records come from the boot loader's values; the PMP report driver checks the running image in SRAM against the image the values name before it starts the PMP, so the same support serves both images. Add a KUnit case for the 27.2 image beside the one that refuses the T6031 image. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
The firmware-27 backend answers the DCP's realtime bandwidth request
with the address of its slot in the PMGR bandwidth page, and refuses
to bind a DCP whose device tree names none ("Incompatible devicetree").
The T8122 internal DCP already lists that page as its disp-5 range;
its slot is at 0x908 (the T8122 ADT; dcpext's is 0x910, already
described).
Name it with apple,bw-scratch on the internal DCP, inside its disp-5
window. The 14.x paths do not read it.
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
On the macOS 27.2 (26B123) system firmware the boot loader hands the T8122 (M3 MacBook Air) internal DCP over running the 27.2 image 93FA4B31-BB97-3B2A-8673-49EA489EE9C1, firmware version and compatibility 27.2.0. dcp_check_firmware_version() has no arm for it: it falls through to the 14.7 board record and stops, so the panel stays on the boot framebuffer. Select the firmware-27 backend with the 27.2 method table for an apple,t8122-dcp handed over on that image (apple_t8122_dcp_v27_2(), by processor and image as the T6041 and T8132 checks are), and give it the internal-panel profile the T6041 27.2 internal DCP uses: adopt the live session, 41-bit firmware DMA (its DART window is 0x100_0000_0000 + 64 GiB), no DPTX port services (dcpext drives the ports). The T8122 /arm-io/disp0 names the same two provider clocks as the T6041 one (345 at 712 MHz, the device tree's disp0 clock, and 416 at 0 Hz), so it takes the same two-entry clock table when the boot loader publishes no apple,clock-ids. The 14.x image keeps the native 14.7 path and the 25G83 profile; they neither match the 27.2 image nor read these settings. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
CI status on the first run. Every failure comes from the two PRs this one is stacked on, not from the three commits here:
Assisted-by: LLM (Claude:Opus 5.5) |
|
Status update (J615, M3 Air 15", macOS 27.2). Hardware, now on aura main. The panel row is requalified on a main-based Stage 2: aura main 3efa4a81 merged with aura aurora-silicon/aura#227 (e78cbf2a), plus this PR's exact kernel (integration + #2541 + #2526 + these 3 commits) with Branch state. This branch now conflicts with integration/aurora, but only by adjacency in
Plan. We don't force-push. Once #2541 and #2526 land, I'll open a fresh PR with only these 3 commits on integration/aurora (already rebased and compile-checked locally, W=1 on drm/apple, soc/apple and the J613/J615 DTBs) and close this one as superseded. That also keeps #2526's unsigned commits out of this PR's history. Evidence and local results
Assisted-by: LLM (Claude:Opus 5.5) |
|
apple_t8132_dcpext_v27_2() in include/linux/soc/apple/t8132.h requires of_machine_is_compatible("apple,j773g") in addition to apple_dcp_image_v27_2() on the apple,t8132-dcpext node. The firmware interface is a property of the coprocessor and the firmware image it runs, both of which are already checked, so the board name should not decide which IOMFB backend is used. Drop the board check (or, if another T8132 board really differs, express that difference as a DT property on the dcpext node). Until then this should stay a draft. |
|
Superseded by #2688, which carries only the T8122 part (the three T8122 commits plus the two generic helpers they need) directly on |
Stacked on #2541 (
apple_dcp_image_v27_2(), bandwidth slot inside a described display window) and #2526 (start the remote allocator only where firmware 27 advertises it). The last three commits are this change.Problem. On the macOS 27.2 (26B123) system firmware, the M3 MacBook Air's (T8122, J613/J615) internal panel stays on simpledrm, for three reasons. The display gate refuses the 27.2 PMP image.
dcp_check_firmware_version()has no arm for the 27.2 DCP image. And the firmware-27 backend needs things the T8122 internal DCP doesn't describe: a bandwidth slot (without one, probe stops at "Incompatible devicetree") and a provider clock table.Change.
apple,bw-scratch = <&pmgr_dcp 0 5 0x908>, inside its own disp-5 window (the PMGR bandwidth page; dcpext's slot 0x910 is already described).apple,t8122-dcphanded over on the 27.2 image (93FA4B31-..., firmware/compat 27.2.0) runs the firmware-27 backend with the 27.2 table. Selection is by processor and image, the same way as for T6041/T8132, with no board check. It uses the T6041 27.2 internal-panel profile: live-session adoption, 41-bit firmware DMA, no DPTX ports, and the two-entry disp0 clock table (the T8122 ADT names the same pair: 345 at 712 MHz, 416 at 0 Hz). The 14.x image keeps the native 14.7 path and the 25G83 profile. Adds host-test cases to the apple-dcpt6041-v27-admissionunit.Testing. J615 (MacBook Air 15" M3) on the 27.2 stub, aura b13.1 + aurora-silicon/aura#227 (publishes the 27.2 DCP handoff):
[drm] Initialized apple, eDP-1 connected 2880x1800@60.appledrm.show_notch=1the full panel mode 2880x1864@60. Atomic flips at 2880x1864: 60.000 Hz, median 16.667 ms, 0 of 691 off grid.tools/testing/selftests/drivers/gpu/apple-dcp/run.py --group all:t6041-v27-admissionpasses, including the new T8122 cases. 87/89 overall:readinessfails to compile on drm/apple, soc: apple: drive the M4 Mac mini's (J773g) HDMI from dcpext0 on macOS 27.2 (v27 backend) #2541's head andservice-rebindwith drm/apple: firmware 27: start the remote allocator only where advertised; let a dcpext come up before its DP port is announced #2526's afk.c change; neither is from this change (details below).Still to run. An external display on dcpext (separate change). GNOME draws in software on this Mac until a G15 27.2 GPU path exists (see #2571 for the dumb-buffer side). DCP firmware stop on DPMS off / s2idle for T8122 needs a measured power sequence first.
Boot logs, kits and method
appledrm.show_notch=1).readinesscallsapple_t8132_firmware_path()/apple_t8132_dcpext_v27_2()without stubs (drm/apple, soc: apple: drive the M4 Mac mini's (J773g) HDMI from dcpext0 on macOS 27.2 (v27 backend) #2541 head 54b8448);service-rebindhits drm/apple: firmware 27: start the remote allocator only where advertised; let a dcpext come up before its DP port is announced #2526'sof_device_is_compatible()in afk.c, which its host unit doesn't stub.Assisted-by: LLM (Claude:Opus 5.5)