Skip to content

soc: apple: display-gate, drm/apple: start the T8122 external DCP on its 27.2 image - #2584

Closed
RyanTheTide wants to merge 1 commit into
j615/t8122-dcp-v27-2from
j615io/t8122-dcpext-v27-2
Closed

RyanTheTide wants to merge 1 commit into
j615/t8122-dcp-v27-2from
j615io/t8122-dcpext-v27-2

Conversation

@RyanTheTide

@RyanTheTide RyanTheTide commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #2580 (the M3 Air internal display on macOS 27.2); base is that branch, so this diff is one commit.

Problem

On the macOS 27.2 stub the boot loader can hand over the M3 (T8122) external display processor (chosen.asahi,t8122-dcpext=1), but the display gate refuses it ("its firmware-compat is not 14.7.0"), so neither USB-C port gets DisplayPort alt mode. Admitting it naively also breaks the internal panel: the external display DARTs are described with 14.7 windows from 0, the panel's DARTs use the 1 TiB alias, and the display subsystem ends up with no common window (DART translation faults, panel loses its modes).

Change

  • apple_t8122_dcpext_v27_2(): a T8122 dcpext with firmware version/compat 27.2.0 beside an internal DCP on the 27.2 image (the boot loader publishes no image UUID for the dcpext; it runs the internal processor's image).
  • Gate: admit it alongside 14.7.0, and give both dcpext DARTs the internal DCP DART's apple,dma-range (the panel's window) on that path only. The device tree keeps the 14.7 windows.
  • DCP driver: firmware-27 table, cold start (DISPEXT domains are off at handoff, nothing to adopt), two DPTX ports expected (num_dptx_ports = 2), no firmware clock table (as the T6041 dcpext).

Testing

J615 (MacBook Air 15", M3), 27.2 stub, boot loader with chosen.asahi,t8122-dcpext=1, one-shot lab boots:

  • before: gate refuses the dcpext;
  • with this change and the unchanged device tree: gate admits it, dcpext starts (RTKit, IOMFB endpoint, "DCP booted"), DRM gains DP-1 and DP-2 (both USB-C ports), internal eDP stays connected and enabled, 0 DART faults / SError.
  • checkpatch --strict clean; builds (arm64, LLVM).

Still to run

  • A real external monitor on each USB-C port (modeset, hotplug) - none was attached overnight. Note: at boot the 27.2 dcpext announces only its system, powerlog and disp0 services; the per-port DPTX service is not announced ("DPTX port 0 not announced yet", tolerated by the base branch), so link training after HPD is unproven here (the J773g on 27.2 hits "dptx service for port 0 not enabled" at that point).
  • s2idle with the external processor up.
  • The boot loader side: aura only arms the T8122 dcpext by default on the J613 today; the J615 needs the config line (or a hardware-keyed default) until that changes.
Boot-by-boot evidence (lab steps on the J615)
step kernel boot loader DT result
1 d1 (no admission) dcpext armed aura reserves dcpext firmware: firmware-ready 1, version/compat 27.2.0, 4 regions, first = internal DCP text region, no UUID; DISPEXT domains off; gate refuses (14.7.0)
2 admission only dcpext DART windows from 0 gate admits; dcpext bind -EINVAL; panel loses modes; display-subsystem: non-overlapping DMA windows 0x0..0xffffeffff, 0x100_0000_0000..; disp0 DART translation faults
3 admission only dcpext DARTs moved to the 1 TiB alias by hand panel fine; dcpext bind still -EINVAL (no apple,clock-ids)
4 + clock-table exemption alias by hand dcpext boots, DP-1/DP-2, panel fine
5 this commit (gate sets the alias) unchanged DT same as 4, 0 faults

Lab kernels were built from the J615 bring-up tree, where the refmac firmware-27 path already admits a t8122-dcpext at 27.2.0, so they carry this change minus the dcp_check_firmware_version() hunk; on this branch that hunk is what selects the firmware-27 table.

Assisted-by: LLM (Claude:Opus 5.5)

…its 27.2 image

On the macOS 27.2 (26B123) system firmware the boot loader can reserve
the T8122 external display processor's firmware (chosen
asahi,t8122-dcpext): it marks dcp@31ac00000 firmware-ready and
publishes firmware version and compatibility 27.2.0, but no image
UUID. The gate then refuses it ("its firmware-compat is not 14.7.0"),
so neither USB-C port gets DisplayPort alt mode.

The processor runs the internal DCP's 27.2 image: the first region the
boot loader reserves for it is the internal DCP's text region. Its
DISPEXT power domains are off at handoff, so nothing is running there
to adopt; Linux starts it, as it does the 14.7 one.

Add apple_t8122_dcpext_v27_2(): a T8122 dcpext whose firmware version
and compatibility are 27.2.0, beside an internal DCP handed over on the
27.2 image. The gate admits it alongside 14.7.0, and the DCP driver
runs it on the firmware-27 backend with the 27.2 table, with the
firmware-27 endpoints, both DPTX port services, no live-session
adoption, and without a firmware clock table, as the T6041 dcpext (it
has no apple,clock-ids; counting them failed the bind with -EINVAL).

On that image the processor and its scanout also use the panel's DMA
window, the 1 TiB alias. The display subsystem takes the window all
its display DARTs share, and the device tree's 14.7 windows for the
external DARTs (from 0) share none with the panel's: once the external
processor joined, the internal DCP lost its scanout mappings (DART
translation faults, no modes). When it admits the 27.2 image, the gate
copies the internal DCP DART's apple,dma-range onto both external
DARTs, as the J613 native 26.x device tree does for that firmware; the
device tree keeps the 14.7 windows.

The 14.7 and native 26.x paths are unchanged.

Tested on the J615 (MacBook Air 15", M3), 27.2 stub, boot loader with
chosen.asahi,t8122-dcpext=1 and its unchanged device tree: before, the
gate refused the dcpext; with this change it starts (RTKit, IOMFB
endpoint, "DCP booted"), DRM gains DP-1 and DP-2 for the two USB-C
ports, the internal panel stays connected, no DART faults. No external
monitor was attached.

Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Blockers: 2.

  1. include/linux/soc/apple/display.h:84-103: apple_t8122_dcpext_v27_2() admits the external processor only when its firmware version and compat are exactly 27.2.0 and the internal DCP carries one specific image UUID. That is a firmware-version gate. The next system firmware that runs the same arrangement is refused again, or worse, is taken down a path that was proven only for this one image. The two facts the kernel actually needs come from the boot loader: the dcpext runs the internal DCP's image (aura already knows, because it reserves the internal text region as the first region), and which ABI that image speaks (the DCP driver already maps firmware-compat to a method table with dcp_v27_method_table()). Have aura publish the dcpext's image identity, as it does for the internal DCP. Then admit any dcpext whose compat resolves to a method table, and keep refusing when the property is absent.
  2. drivers/soc/apple/display-gate.c:1916-1952 and :2059: the gate rewrites both external DARTs' apple,dma-range with the internal DART's window whenever this version test matches. The DMA window belongs to whoever loaded the firmware. The boot loader picks the image and already writes the internal DART's window, and the native 26.x device tree carries the shared window for the same reason. Write the dcpext DART windows from aura for the image it loads, and drop gate_t8122_dcpext_alias(). With the aura side landed first, the consumer needs no fallback beyond today's refusal.

Nit: drivers/gpu/drm/apple/dcp.c:7303-7306: the comment says the DART window is "the one the device tree describes", but on this path the gate has just replaced it.

HW row: J615 on the 27.2 stub, default command line: an external monitor on each USB-C port is modeset at its native mode with hotplug out/in, the internal panel stays up throughout, then one s2idle cycle with the external display lit, 0 DART faults, 0 new kernel errors. The body notes that the per-port DPTX service is not announced at boot, so this is the row that shows DP-1/DP-2 actually train.

Assisted-by: LLM (Claude:Opus 5.5)

@RyanTheTide

Copy link
Copy Markdown
Contributor Author

Superseded by #2704: the same commit on #2688, since this PR's base (#2580) was closed.

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.

1 participant