Repository navigation
soc: apple: display-gate, drm/apple: start the M3 Air's (T8122) external DCP on its 27.2 image - #2704
RyanTheTide wants to merge 5 commits into
Conversation
…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, stock command line,
its unchanged device tree and a boot loader that reserves the dcpext by
default: before, the gate refused the dcpext; with this change it starts
(RTKit, "firmware 27: DPTX controller on 0x24, ports on 0x2a", both DPTX
port services, "DCP booted"), DRM gains DP-1 and DP-2 for the two USB-C
ports, the internal panel stays connected, s2idle resumes, no DART
faults. No external monitor was attached.
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
DjDeveloperr
left a comment
There was a problem hiding this comment.
Adversarial review of head 3d969657663738b87739591337c6ff04504374ff against the pre-PR checklist.
Stacking & dependency status
- Stacked on
aurora-silicon/linux#2688(base=j615/t8122-dcp-27-2-standalone), which is still OPEN. Must not merge until#2688lands and#2704is retargeted ontointegration/aurora. - Hard runtime dependency on
aurora-silicon/linux#2526(still OPEN): Without#2526, T8122 27.2dcpextlacks remote-allocator advertisement gating,dcp_v27_dptx_layout()(DPTX_CONTROLLER_ENDPOINT0x24 +DPTX_ENDPOINT0x2a), andafk.c'sdcp->dcpextEPIC identity handling — sot8122-dcpexton 27.2 cannot bring up DPTX at all on this branch alone. - Boot loader dependency: Default-on handoff without
chosen.asahi,t8122-dcpext=1depends onaurora-silicon/aura#437(still OPEN; its current head48fdf64ais not yet boot-tested on hardware). - CI gap due to stacking:
SEP source checks(6/6) passed, butHost tests(host-tests.yml) did NOT run because it triggers only onintegration/aurora/aurora-wip.
What checks out
- No model/board gating & safe fallbacks: Uses
apple,t8122-dcpextcompatible + firmware version/compat + internal DCP handoff state; 14.7 and native 26.x paths are untouched;gate_t8122_dcpext()keeps existingCONFIG_DRM_APPLEandnomodeset(video_firmware_drivers_only()) guards so Type-C USB ports are never stranded without a display driver. - Attribution: Single commit with clean human authorship and
Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>, no agent trailers; PR body ends withAssisted-by:.
Blockers
-
Insufficient hardware evidence for external display enablement (Checklist §5 & §1):
- No external monitor has been tested yet (PR body lists "A monitor on either USB-C port (modeset, hotplug)" and "The J613" under Still to run).
- Booting with DP-1/DP-2 connectors unattached does not verify DP link training, EDID read, modeset, hotplug/unplug, or s2idle with a monitor attached (especially important given firmware-27 external DCP sleep behavior).
- The J615 boot row also ran against
aura#437commit 1 (which loggedOVERLAP DETECTEDand skipped DART checks), notaura#437head48fdf64a. - J613 (M3 Air 13") has no boot row yet.
-
Stacking, unmerged runtime dependency (
#2526), and missing CI + unit tests:- Cannot land while base
#2688and runtime dependency#2526remain open, and before retargeting ontointegration/aurorasohost-testsruns. - Unlike
#2688, this PR adds no unit/KUnit/host tests forapple_t8122_dcpext_v27_2(), thedcp_check_firmware_version()apple,t8122-dcpext27.2 arm, orgate_t8122_dcpext_alias()(e.g. indisplay-gate-test.candtools/testing/selftests/drivers/gpu/apple-dcp/boot.py).
- Cannot land while base
Non-blocking code issues & hardening notes
- Stale comment &
firmware_dma_bitsconsistency (drivers/gpu/drm/apple/dcp.c:7282-7289): The comment states "Its DART window is the one the device tree describes," butgate_t8122_dcpext_alias()overwrites the DT's 14.7 windows with the panel's 1 TiB alias (0x100_0000_0000 + 64 GiB).dcp->hw.firmware_dma_bitsis also left0(falling back to 42 atdcp.c:6433), which covers the 41-bit window in practice but is inconsistent with the neighboringapple,t8122-dcpandapple,t6041-dcpextblocks (firmware_dma_bits = 41). - Stale refusal message (
drivers/gpu/drm/apple/dcp.c:6021): Still logs"T8122 external display not started: DCP firmware-compat %s is not 14.7.0"even when 27.2 is now also supported (comparedisplay-gate.c:1953, which was updated to"neither 14.7.0 nor the 27.2 image"). gate_t8122_dcpext_alias()hardening (drivers/soc/apple/display-gate.c:1905-1926): Checkwindow->length == 2 * sizeof(u64)(16 bytes) rather than onlywindow->length != 0, and freeprop/valueifof_changeset_update_property()returns an error.- Image identity indirection (
include/linux/soc/apple/display.h:96-115):apple_t8122_dcpext_v27_2()infersdcpext's image UUID fromapple,t8122-dcpbecauseauradoesn't publishapple,firmware-uuidon T8122dcpext(unlikedt_reserve_j713_dcpext_one()). That holds onaura#437's default path, but underchosen.asahi,t8122-dcpext=1auradoes not verifydt_t8122_dcpext_shares_image(). Publishingapple,firmware-uuidondcpextinauraand usingapple_dcp_image_v27_2()directly would close that gap.
Assisted-by: LLM (Google:Gemini 4 Neon)
|
J615 external-monitor row with this PR at 3d96965 (blocker 1). The test kernel carried this head, plus #2783 for the EDID; Stage 2 = aura#437 15dfa6e9. MSI MPG 325CQRXF on USB-C, default command line. The external DCP starts on its 27.2 image and drives 2560x1440 @ 280 Hz beside the internal panel. EDID name, colourspace (BT2020_RGB), HDR (PQ, 10 bpc) and VRR (48-280 Hz; KMS pacing test 299/299 at 20.0 ms with VRR on, 0/299 with it off) all match macOS. s2idle with the monitor attached passed 3/3, with 0 failed units and no new kernel errors. Full table: aurora-silicon/aura#437 (comment) . The J615 is back on its default boot. |
DjDeveloperr
left a comment
There was a problem hiding this comment.
Re-reviewed head 3d969657663738b87739591337c6ff04504374ff against pre-pr-checklist.md (§1–§6) following the new J615 external-monitor row (#issuecomment-7077465061) and the merges of #2688 and #2526.
Resolved since prior review
- Blocker 1 — J615 external-monitor &
aura#437hardware evidence (§5, §2): Resolved by#issuecomment-7077465061(full table ataurora-silicon/aura#437#issuecomment-7077463348). Verified on J615 (M3 Air 15") with3d969657+aura#43715dfa6e9on the default command line: MSI MPG 325CQRXF lights up at 2560x1440 @ 280 Hz beside the internal panel (and with#2783, full 384 B EDID, BT.2020_RGB, HDR PQ 10 bpc, and VRR 48–280 Hz KMS pacing 299/299 vs 0/299), s2idle 3/3 pass with monitor attached, 0 failed units, SELinux Enforcing, 0 new kernel errors. - Merged kernel prerequisites: Both base PR
#2688(15bd86e3) and runtime dependency#2526(67f853fb) are now merged intointegration/aurora. - Checklist §1, §2, §3, §4, §6: Clean — no board/model gating, default command line, DMA window derived from the internal DCP DART's DT property, human-only commit author/committer/
Signed-off-by:.
Remaining blockers (keeping CHANGES_REQUESTED)
- Base branch & missing
Host testsCI:- PR
#2704still targets the already-merged branchj615/t8122-dcp-27-2-standalone(parenta3b0fd4f, 160 commits behindintegration/auroraand predating#2526's merge into#2688). - Please rebase onto and retarget the PR base to
integration/aurorasoHost tests(host-tests.yml, which only triggers onintegration/aurora/aurora-wip) runs and passes alongsideSEP source checks(currently 6/6 green on the old base).
- PR
- Missing unit/host regression tests:
- Still no unit/KUnit/host tests covering
apple_t8122_dcpext_v27_2(), thedcp_check_firmware_version()apple,t8122-dcpext27.2 arm, orgate_t8122_dcpext_alias()(e.g., indrivers/soc/apple/display-gate-test.candtools/testing/selftests/drivers/gpu/apple-dcp/boot.py).
- Still no unit/KUnit/host tests covering
Non-blocking notes
- J613 (M3 Air 13", §1): Still listed under Still to run; fine to request a regression boot row from a J613 holder if not available locally.
- Unchanged hardening notes from prior review (good to fold in during the rebase if convenient): stale comment +
firmware_dma_bitsconsistency atdrivers/gpu/drm/apple/dcp.c:7282-7289, stale refusal log atdrivers/gpu/drm/apple/dcp.c:6021,window->length == 2 * sizeof(u64)+ error-pathkfreeingate_t8122_dcpext_alias()(drivers/soc/apple/display-gate.c:1905-1926), and directapple,firmware-uuidcheck onceaurapublishes it on T8122dcpext.
Assisted-by: LLM (Gemini 4 Neon)
…ndow copy gate_t8122_dcpext_alias() took the internal DCP DART's apple,dma-range whatever its length. The DART driver reads that property as one window, a start and a size (two u64), so copy only a property of that length; anything else leaves the dcpext disabled as a missing window does. Free the property it built if the changeset does not take it. In the DCP driver, the T8122 dcpext on firmware 27 runs in the window the gate copied, the panel's (0x100_0000_0000 + 64 GiB), not the device tree's: say so, and give it the internal processor's 41-bit firmware DMA addressing, as the T8122 and T6041 processors on firmware 27 have. The window is below 2^41, so its mappings do not change. The refusal of other firmware now names both images the driver runs. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
gate_t8122_pmp_image_27_2 hands the gate the 27.2 PMP image, which the gate takes, then checks the enabled PMP against the fixture's 14.x image UUID, so it always failed. Check it against the image the case passed. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Add the T8122 external display processor (dcpext) of t8122-dcp.dtsi to the gate's T8122 test tree, with its DARTs' 14.7 windows and the panel DARTs' window, but without the boot loader's firmware-ready mark, and KUnit cases for its admission: - without the mark it stays disabled; - on 14.7.0 it is enabled with its DARTs, mailbox, power floor, PMP DISPEXT request and display DART, and keeps the device tree's windows; - on 27.2.0 beside an internal DCP handed over on the 27.2 image (apple_t8122_dcpext_v27_2()) both of its DARTs get the panel's window; - 27.2.0 beside an internal DCP on its 14.x image, another version than compatibility, no version, or 27.0.0 leave it disabled; - without a panel window the 27.2 one is not enabled and nothing changes; - gate_t8122_dcpext_alias() alone copies one window onto both DARTs and refuses a window that is not one start and one size. The gate keeps the changeset that enabled the dcpext so the test can revert it, as it does for the panel's. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
Build apple_t8122_dcpext_v27_2() and the apple,t8122-dcpext arm of dcp_check_firmware_version() from the tree on the host and check which backend each firmware gets: the 27.2 table only for a dcpext whose version and compatibility are both 27.2.0 beside an internal DCP handed over on the 27.2 (26B123) image; nothing for another internal image, a missing internal DCP, another SoC's processor, or other or malformed versions; the 14.7 template and the native 26.x H17P path as before. The t6041 admission harness's stubs become a shared prelude, with an of_find_compatible_node() over the test's two processors. Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
|
Both remaining blockers from the 2026-11-22 review are addressed. Base: the PR now targets Tests:
Hardening notes folded in:
Also fixed: Commits and test numbers
All tests ran on the head merged onto integration/aurora 00cbc67. KUnit, arm64 qemu,
New dcpext cases:
Host tests:
Build and style:
Still to run: no change to the hardware rows. The new code changes only the DMA mask, and the window it covers is the same. A J615 re-boot with an external monitor would confirm that. The J613 row is still open. Assisted-by: LLM (Claude:Opus 5.5) |
Problem
On the macOS 27.2 (26B123) system firmware, the boot loader reserves the M3 MacBook Air's (T8122) external display processor (dcpext) firmware and publishes version and compatibility 27.2.0, but the display gate only admits a 14.7.0 dcpext. It refuses the 27.2 one ("its firmware-compat is not 14.7.0"), so neither USB-C port gets DisplayPort.
Change
One commit, stacked on #2688 (T8122 internal DCP on 27.2). It replaces #2584, whose base branch (#2580) was closed. The code is the same commit, cherry-picked without conflicts.
apple_t8122_dcpext_v27_2()admits a T8122 dcpext whose own firmware version and compatibility are 27.2.0, next to an internal DCP that was handed over on the 27.2 image. The selection uses the block's compatible and the firmware ABI, with no board check.apple,dma-range(the 1 TiB alias) onto both external DARTs, because the device tree's 14.7 windows share none with the panel's, and the panel lost its scanout when the external processor joined.The rest of the M4 Air (J713) external-display series (#2673) is not needed on T8122:
apple,dp-alt-modeis read only for T8132 ATC PHYs.apple,dcpextfallback.Testing
J615 (MacBook Air 15", M3), 27.2 stub, stock command line, the J615 default Stage 2 plus the aura default for the dcpext handoff (aurora-silicon/aura#437):
dcp@31ac00000with both Type-C routes and both crossbars;Row detail
Build: W=1 clean on display-gate.o and dcp.o; checkpatch reports 0 errors and 0 warnings.
Still to run
Assisted-by: LLM (Claude:Opus 5.5)