Repository navigation
drm/apple: admit M1/M2/M3 display processors on firmware 27.2 (follow-up to #1832) - #3133
Conversation
The T8103, T600x, T8112, T602x, T8122, T6030 and T603x display processors share one firmware-27 wire generation with the T6050: the same IOMobileFramebuffer method numbering, AFK wire v2 and v27 drive record. On exact firmware-compat 27.2.0 they should run that generation instead of the 14.7-era session the boot loader previously handed them. Give each of these processors' DCP and dcpext a version-aware firmware-27 admission. dcp_check_firmware_version() now selects DCP_FIRMWARE_V_27_0 with the in-tree 27.2.0 method table before the 14.7 board and special-profile checks, so the T8122 and T6030 14.7-only rejections no longer apply to the 27.2 arm. The older admissions stay in place unchanged for the firmware those boards still boot, and the probe keeps each processor's port count, tunnel-flow flag, connector topology, DMA width and DART resources from its own match data; only the live-session adoption is version-selected. The shared v27 method-table validation is factored into one helper reused by both firmware-27 arms. Add an apple-dcp-v27 KUnit suite covering which compatibles the admission recognises, that the non-refmac firmware-27 processors keep their own paths, and that the 27.2.0 method table is complete. Signed-off-by: Ryan Murray <[email protected]> [Dj: rebased onto main, using main's dcp_v27_method_table() and keeping adoption ahead of main's per-SoC firmware-27 profiles.] Signed-off-by: Dj <[email protected]>
Firmware 27 was admitted three ways: T6050 by its match data, T8142 by its compatible on exact 27.0.0, and the M1/M2/M3 processors through a list of fourteen DCP and dcpext compatibles on exact 27.2.0. The deciding facts are the same everywhere: the DCP reports firmware-compat 27 or later, and the driver has a complete method table for that build. Replace the compatible list and the T8142 arm with one helper, dcp_v27_admission(), used for every DCP and dcpext before any per-SoC selection. A firmware-compat of 27 or later runs the firmware-27 instance when iomfb_v27_methods() has a complete table for the build, and is not started otherwise: the interfaces written for older firmware make it panic (T8142 on 27.0 with H17P). Older firmware keeps the existing 26.x, 14.x and 13.x selection unchanged. Every processor on firmware 27 adopts the live session the loader handed over. What stays per SoC has a hardware reason: the T6050 has no interface older than firmware 27; the T8140 dcpext is refused before selection on anything but 26.6.2; T8142 on firmware 27 keeps the default method profile, since with H17G every swap fails with status 4. This also admits T6041, T8132, T8140 and T8142 on firmware 27 builds with a complete table (T8142 newly on 27.2.0); none has been run on 27.2. The T8140's method profile on firmware 27 is left to a separate change. Rewrite the apple-dcp-v27 KUnit suite for the rule: complete 27.x tables are admitted, 27.x and later builds without a usable table are refused, older firmware is left to the older selection. Signed-off-by: Ryan <[email protected]> [Dj: rebased onto main: main's T8142 and T8122 firmware-27 arms are kept ahead of dcp_firmware_27(), which reports a refused build through main's dcp_v27_method_table(); the blanket adoption comes before main's per-SoC firmware-27 profiles, so the T8122 dcpext still starts cold.] Signed-off-by: Dj <[email protected]>
On the macOS 27.2 (26B123) system firmware the boot loader passes the T6030 PMP values with tunable-uuid 5D66805B-E4AD-335E-BDC3-26828C682AAC, the PMP image the J516S ADT names for that release (iop-pmp-nub). The gate takes only the 14.x image (2F4EB4C4-...), so on a 27.2 J516s it stops with "PMP not added: this Mac's PMP firmware image is 5D66805B-..." and the internal display and both dcpext stay disabled. Take the 27.2 image as well, as for the T8122. The 27.2 PMP PTD map only inserts LTS-VOLT-CAP and leaves the SOC-DEV-PS-REQ, PS-ACK and PMP-STATUS offsets the T6030 PMP report reads unchanged, and the soc-device records are byte-identical to the J516S overlay's. 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 T8122 image. Signed-off-by: Dj <[email protected]>
…ability Keep explicit match-data pins (T6050, T8142, T8132 M4, T8140 H17P) and image-UUID pins (T6041, T8122) ahead of generic dcp_firmware_27() admission in dcp_check_firmware_version(), making T8122 wrong or missing 27.2 UUIDs and internal T8142 unknown 27.x builds terminal refusals rather than taking generic firmware-27 or H17P. Configure firmware-27 internal panels from DT capabilities instead of SoC allowlists: verify available child routes inside typec-routes, derive firmware DMA width from the DCP DART apple,dma-range aperture when match data does not already set one (keeping DART-derived DMA widths on external profiles and only falling back when no aperture is supplied), exempt firmware-27 from the legacy apple,bw-scratch check, and restrict the single-clock disp0 fallback to internal-panel-only DCPs with exactly one unnamed clock so non-panel paths never fabricate clocks. Factor apple_t8122_dcpext_v27_2_for_internal() in include/linux/soc/apple/display.h and add KUnit coverage for T8122 internal/external, T6041 internal/external, T8142 (DCP_FIRMWARE_H17P on 26.6), T8132 pin precedence, terminal refusals, and typec-routes child availability. Signed-off-by: Dj <[email protected]>
The internal display uses slot 1 in the PMGR bandwidth window for bandwidth requests on firmware 27.2. Point the DCP at that slot in disp-5 so the driver can resolve the scratch register. Signed-off-by: Dj <[email protected]>
The T6041 host test omits helpers now needed by the firmware selector. The T8122 dcpext test omits the new internal-image helper and extracts the legacy branch, which valid 27.2 firmware returns before reaching. Use the complete selector and its firmware-27 dependencies in both tests. Verify that the pinned images are admitted, that bad UUIDs and builds are refused before any fallback, and that legacy firmware still selects its corresponding backend. Signed-off-by: Dj <[email protected]>
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at 15841a22b2de
Blockers:
drivers/gpu/drm/apple/dcp.c:8093–8096,8116–8137: the driver already readsapple,rtkit-handoffto distinguish a running DCP from a cold one. The new firmware-27 branch sets live-session adoption even when that witness is absent. A compatible firmware ABI and a panel node describe the hardware, while the boot loader determines whether a live session exists. Keep the DART-width and panel-port capability logic, and make the new adoption path depend on the actual handoff marker. Cover both a marked live DCP and an otherwise identical cold DCP in the host fixture.- Add exact shared boot/display checks alongside the J516s target row. J473 and J616s cover separate shared DCP paths. Include the active connector and a short resume.
Checked: The panel-only predicate reads actual DT topology and the new DMA-width helper reads the DART aperture. The J516s row demonstrates the running 27.2 panel path.
|
Merge readiness at
Areas: Updated by pr-readiness on pushes, edits, reviews and comments, and on a schedule. Rules: merge policy · labels. |
Firmware 27 and a panel child describe the interface and port layout. They can also be present on a cold DCP. Inferring a running session from either makes the driver refuse to start that processor. Keep the RTKit session handoff check. For firmware 27, also accept the single-cell marker that the bootloader sets to 1 on an internal DCP after validating the running processor and its DARTs. Select the marker from the DCP match data. This lets the J516s keep its iBoot display without implying that the bootloader already negotiated RTKit. Derive DMA width and panel port count independently. Exercise marked and cold probes across the four internal profiles, including zero and foreign markers. Signed-off-by: Dj <[email protected]>
|
Addressed Blocker #1 in additive commit
Blocker #2 (J473 and J616s shared display checks + exact-head J516s refresh at |
|
Hardware row for J516s (16-inch MacBook Pro M3 Pro, T6030, macOS 27.2 / 26B123) at exact head
|
|
|
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: FINISH, then merge at 030b3844c926
Blockers: drivers/gpu/drm/apple/dcp-firmware-test.c:254: the new dcp_firmware_27_pin_precedence() uses a 2,144-byte frame when compiled with arm64 GCC and display KUnit enabled. The build treats the 2,048-byte limit as an error. Move the mock device/node/property fixture into KUnit-managed allocations and rerun the GCC build with display KUnit enabled.
Checked: The updated probe consumes the live handoff marker, and the J516s target and J615/J316s regression results cover display initialization and short wake. The old handoff-fallback finding is resolved at this head.
Evidence
- J516s target read the handoff marker and retired the boot scanout with zero DCP or DART faults.
- J615 and J316s each passed one guarded short wake. That same report records the GCC build failure and the successful production boot with KUnit disabled. This test function is added by this PR.
…_kzalloc Keep the mock device, device nodes, and property arrays off the stack in dcp_firmware_27_pin_precedence() so arm64 GCC builds with CONFIG_DRM_APPLE_DISPLAY_KUNIT_TEST enabled stay well under the 2,048-byte frame-size limit (272 bytes vs 2,144 bytes). Signed-off-by: Dj <[email protected]>
|
Addressed the arm64 GCC frame-size blocker in additive commit
|
RyanTheTide
left a comment
There was a problem hiding this comment.
Verdict: MERGE at 5a86f018f9d78a503d1ac93b9841d70e0f37de2b.
Blockers: None. The GCC frame limit finding is fixed.
Checked: The forward changes only a display KUnit fixture. The J516s, J615 and J316s runtime rows still apply. All current substantive checks passed, including Host tests and Apple DRM KUnit.
Evidence
On ARM64 GCC 16.1.0 with display KUnit enabled and -Werror=frame-larger-than=2048, the previously failing test compiled with a 272-byte static frame. The previous measured frame was 2,144 bytes. The two buffers now belong to the KUnit fixture. The runtime diff against the tested head is empty.
RyanTheTide
left a comment
There was a problem hiding this comment.
The GCC frame-size finding is fixed: kunit_kzalloc() takes dcp-firmware-test.c:254 from 2,144 B down to 272 B under -Werror=frame-larger-than=2048. It's test-only, with zero runtime diff from 030b384, so our J615 (27.2 internal + external DCP, s2idle) and J316s (13.5, 3x DCP, s2idle) rows stand. CI 27/27. Approving.
What: Standalone follow-up to draft #1832 rebased onto
main(8c6bd8d1e8067) preserving all three original commits and authorship verbatim, adding terminal v27 UUID/build refusals, DT-capability panel configuration and DART-derived DMA width,DCP_FIRMWARE_H17PKUnit fix, T6030 DCP 27.2 bandwidth scratch slot int6030-dcp.dtsi, and updated T6041/T8122 v27-admission host fixtures.Tested: J516s (M3 Pro, T6030) at
15841a22(combined bare-metal candidate3b68024a1faacontaining2737d4beunchanged; subsequent commit15841a22updates host test fixtures only and changes zero compiled kernel/DTB bytes): native DCP 27.2eDP-13456x2234@120Hz(6 ProMotion modes),apple-panel-bl,Using Dashboard 3503d0988,boot scanout retired by displayed swap 5, 0 DART/DCP faults, 0 failed units. Host suite:apple-dcp95/95 PASS, 12/12tools/asahiDCP/T6030 scripts PASS, Clang-fsyntax-onlyPASS, strict checkpatch 0/0/0.Risk: two-way door · M1/M2/M3 display processors (
T6030,T6031,T8122, and shareddrm/appleDCP firmware selection)Not yet: Non-J516s shared-code regression rows (
J473/J413/J616srequested).Details
main(8c6bd8d1e8067) preserving Ryan's three drm/apple: admit the M1/M2/M3 display processors on firmware 27.2 #1832 commits (855f86267e46d,65ff2bc384a9b,48aaad34f58cf) verbatim without touching the drm/apple: admit the M1/M2/M3 display processors on firmware 27.2 #1832 branch.typec-routeschildren by DT capability, derives DMA width from the DART, and fixes theDCP_FIRMWARE_H17PKUnit symbol (7879c0947f804).pmgr_dcpandapple,bw-scratch(disp-5offset0x988) inarch/arm64/boot/dts/apple/t6030-dcp.dtsi(2737d4be66618) so T6030 DCP 27.2 initializes the internal Liquid Retina XDR panel.apple-dcphost fixtures (15841a22b2de9) to exercise the full production v27 selector (apple-dcp95/95 PASS).Evidence
15841a22b2de928a71407416579ac79fb872b168(2737d4be+ host-test-only commit15841a22).3b68024a1faa5a696d77fb6f91e9f85cf440d0e9(Linux 7.3.0, Aura Stage 2683a128b, default cmdline):eDP-1:3456x2234@120Hz(6 ProMotion modes),apple-panel-bl,Using Dashboard 3503d0988,boot scanout retired by displayed swap 5, 0 DART/DCP faults.systemctl --failed: 0 units.15841a22:apple-dcp95/95 PASS, 12/12tools/asahiDCP/T6030 scripts PASS, Clang-fsyntax-onlyPASS, J516s internal DCP binding + scratch phandle PASS, strict checkpatch 0/0/0.