Skip to content

drm/apple: admit the M1/M2/M3 display processors on firmware 27.2 - #1832

Draft
RyanTheTide wants to merge 2 commits into
integration/aurorafrom
fw272/disp-refmac-v27_2
Draft

RyanTheTide wants to merge 2 commits into
integration/aurorafrom
fw272/disp-refmac-v27_2

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Part of the macOS 27.2 (build 26B123) firmware port for the M1/M2/M3 Macs (FW272).

The 26B123 DCPs for T8103, T600x, T8112, T602x, T8122, T6030 and T603x are one wire generation and share the firmware-27 method table already in iomfb_v27.c (added for T6050). There are no per-SoC method-ID deltas, so no new method constants are introduced here — only version-aware admission.

On exact apple,firmware-compat = <27 2 0>, the DCP and dcpext match data for these SoCs now select DCP_FIRMWARE_V_27_0 with iomfb_v27_methods("27.2.0") before the 14.7 board / special-profile checks, and the 14.7-only rejection is lifted for the exact 27.2 arm. The older 14.7/26.6.2 arms are preserved for other firmware during the transition. Per-SoC topology is untouched: num_dptx_ports, the T6020 tunnel-flow flag, connector topology, DMA width and DART resources are preserved, and dfb_ready_query is not sent.

Shared helpers (dcp_refmac_v27_compat(), dcp_v27_method_table_supported()) keep the selection in one place; the T6050 match structure is not copied wholesale.

Tested: new apple-dcp-v27 KUnit cases admit all 14 refmac compatibles, reject T6050/T8142/T6041/T8140, and assert the 27.2.0 table is complete; full apple-dcp* regression 161/161 green under arm64/QEMU. W=1 clean.

Hardware verification (panel start, clocks, dcpext, VRR, sleep) is gated on the per-Mac 27.2 stub and tracked separately. Panel nits/EDR generalization, DT apple,clock-ids/<27 2 0> publishing and aura handoff are follow-ups.

Draft: part of the staged FW272 series.

Update: the compatible list is replaced by one rule for every DCP and dcpext, dcp_v27_admission(): a firmware-compat of 27 or later runs firmware 27 when its build has a complete method table and is refused otherwise, and every firmware-27 processor adopts the loader's live session.

Assisted-by: LLM (Claude:Opus 5.5)

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.

Assisted-by: LLM
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
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 <ryan@aurorasilicon.org>
@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf.

Hardware result on MacBook Air M2 (J413, T8112), macOS 27.2 (26B123) stub: pass for the internal panel, dcpext probe and s2idle. External display with a monitor attached is not tested yet.

One-shot boot d7eca1c6 (2026-11-20), under the trial watchdog. appledrm.ko was built from this PR's head 3b7f78d74d42, applied in place of phellos's local carry of an earlier revision of this PR. The rest of drm/apple was phellos's 7.3 tree, which still carries its local J413 dcpext-handoff and remote-allocator changes. The module was loaded from the initramfs, and its build ID matched that build.

Row Result
Panel start DCP (231c00000) and dcpext (271c00000) bound on firmware 27. Panel connected and the Hyprland greeter came up at 2560x1664@60 (the only mode; the J413 panel has no VRR).
Brightness apple-panel-bl written 140 → 192 of 525, read back 192, restored. The DCP log shows the matching send_brightness ramps.
dcpext Probed. Both Type-C routes okay, card1-DP-1/DP-2 present (disconnected, no monitor attached).
Sleep One RTC s2idle cycle (rtcwake -d rtc1 -m freeze -s 20, woke on rtc1). The DCP re-set the panel mode on resume and the panel was back at 2560x1664@60, DPMS on.
Regressions The DCP kernel messages match phellos's default boot line for line (the same "DPTX port 0 not announced" / "remote allocator absent" notes). No failed units.

Still to run: an external monitor over USB-C DP (needs someone at the machine). VRR does not apply to this panel.

🤖 Generated with Claude Code

@satchlj

satchlj commented Nov 20, 2026 •

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf.

Follow-up from the J413 27.2 stub: this PR no longer merges cleanly into integration/aurora 61295c2, where dcp.c conflicts in three places. Upstream has since added dcp_ext26_admitted(), dcp_v27_sleep_transport_supported(), the T6041 27.2 arm in dcp_check_firmware_version() (which still uses missing/num_missing) and the T6041 match-data block. In phellos's build, I kept all of upstream's code, used this PR's dcp_firmware_27() in place of the T8142 special case, added the PR's adopt_live_session line before the s2r block, and restored the two locals.

Built that way, together with #2526, it is now phellos's default. Internal panel at 2560x1664@60, brightness readback, dcpext up, s2idle cycle: pass.

🤖 Generated with Claude Code

@satchlj

satchlj commented Nov 20, 2026

Copy link
Copy Markdown
Member

Claude Opus 5.5 on @satchlj's behalf: hardware run.

PR head Checked Result
3b7f78d7 Internal panel 2560x1664@60, backlight write and readback, panel back on after one RTC s2idle. Still conflicts with the tip in dcp.c; merged here with the same resolution as the previous phellos default Pass

Build: phellos (MacBook Air M2, J413, macOS 27.2 / 26B123 stub), default rebuilt 2026-11-20 = linux integration/aurora 458f759 + #2519 #1832 #1831 #2264 #2525 #2526 #2543 #2544 #2545; Aura main 0beafec9 + aurora-silicon/aura#377 aurora-silicon/aura#227 (isp.c only) aurora-silicon/aura#381 aurora-silicon/aura#382; U-Boot aurora-wip 37baf8f7 + aurora-silicon/u-boot#67; Stage 2 DTB t8112-j413-fw27.dtb. One-shot boot under the SoC watchdog, then made the default (two default boots healthy).

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Blockers: 3.

  1. drivers/gpu/drm/apple/dcp.c:5369: dcp_firmware_27() now runs before the hw->firmware_compat pin for every processor, so a T8132 DCP on 27.2 leaves the M4 backend (apple_dcp_hw_t8132, dcp.c:8921, pinned to DCP_FIRMWARE_M4, default 42-bit mask at dcp.c:5800) for the firmware-27 instance. drm/apple, iommu: apple-dart: drive the M4 MacBook Air's internal panel on macOS 27.2 (v27 backend) #2590 found on the J713 that this is not enough on its own: without its apple-dart change the DCP has no IOMMU domain and its firmware gets untranslated addresses, and it also needs 41-bit DMA. The commit message says T6041/T8132/T8140/T8142 are now admitted on 27.x and none has run there. A complete method table only shows the RPC side is known. It does not show the DMA path is ready. Fail closed on what the device reports: refuse firmware 27 when iommu_get_domain_for_dev(dev) is NULL (or the DART did not take the handoff), and take the DMA width from DT/match data. Otherwise keep the SoCs without a 27.x row on their current selection until their own PRs (drm/apple, iommu: apple-dart: drive the M4 MacBook Air's internal panel on macOS 27.2 (v27 backend) #2590, drm/apple: T8140: run the macOS 27.2 DCP firmware as firmware 27 #1809, drm/apple: drive the T6041 DCP and dcpext on firmware 27.2 #1829) land.
  2. On top of the dcp.c conflicts already reported here: the tip now has its own 27.2 arms, T8142 on 27.0.0 || 27.2.0 and the T6041 arm pinned by image (apple_t6041_dcp_v27_2()), both in dcp_check_firmware_version(). A generic rule placed first makes the T6041 image pin dead code. With the pin dead, a T6041 on any other 27.2 image gets admitted on its compat string alone. Rebase onto the tip and decide in the code whether the image pin stays a precondition or goes away; don't leave it to whoever resolves the conflict. The only hardware row so far ran a hand-merged tree, not this head.
  3. Commit c22954a has an Assisted-by: LLM trailer in the commit message. LLM attribution belongs only in the last line of the PR body. Drop the trailer when you re-cut the branch for the rebase (fresh branch, no force push).

Nit: commit 3b7f78d is signed off with a short name; c22954a uses the full name. Use the same identity on both.

HW row: rebased head on the J413 (27.2 stub): panel, backlight readback, dcpext probe, 2x s2idle. Then a production-firmware refmac (J316s on 14.x/26.x) showing the same fw_compat selection as the tip. Then the J713 on 27.2 showing either a clean bind with 0 DART faults or a clean "not started" refusal, never untranslated DMA. All with 0 AVC, 0 failed units, no new kernel errors.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

J473 (T8112) hardware row on macOS 27.2 (26B123), using a narrow adaptation of the method-table admission on integration snapshot a99fc40be. This was a watchdog-backed test kernel with the fleet command line.

Stage 2 handoff Result
Live HDMI session from aurora-silicon/aura#451 and its review revision The primary DCP binds and both Type-C controllers probe. The HDMI dcpext times out during RTKit endpoint discovery (-ETIME), so Linux keeps simpledrm.
Earlier Stage 2, with dcpext left idle Both DCPs bind and Apple DRM registers the outputs. HDMI-A-1 starts at 1920×1080 at 120 Hz and completes an indexed KMS modeset to 180 Hz, verified in active CRTC state.

The native HDMI row exposed BT.2020 RGB and the HDR metadata property, with zero EDID bytes and vrr_capable=0. The Type-C monitor reported disconnected. With the same kernel, a test module selecting the existing advertised-endpoint layout for a primary DCP with Type-C routes discovered both of its DPTX port services. A follow-up module also opened the adapter's AV service at the classic endpoint. This establishes endpoint and service discovery; connector readiness is still open.

The live-session case needs an adoption path that preserves the loader's RTKit session and carries the discovered endpoints and inherited buffers. Waking it through the normal INIT/EPMAP handshake timed out on both loader variants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants