Repository navigation
arm64: apple: native display (DCP) for M5 J813 - #166
Merged
Merged
Conversation
parse_mode() only ever sets vrr (and min_vrr/max_vrr) to true, never clears it, but parse_display_modes() allocates the mode array with kmalloc_array(). When the firmware reports the display again, for example after every DPMS power-on, a mode can inherit a stale vrr flag from the reused allocation. The modeset then enables timestamped VRR swaps the display does not support, and page flips stop completing. Allocate the array zeroed. Fixes: 38c14f6 ("drm: apple: support ProMotion variable refresh rate")
On T8142 the display DARTs are locked and their roots already hold the running display coprocessor's own translations. The boot loader re-exports those translations as reserved IOVA regions, which the IOMMU core maps before attach, so Linux's tables end up with entries in root slots the firmware owns. Publishing only into vacant slots then fails the whole attach with -EBUSY. On locked apple,t8142-dart instances with three-level T8110-format roots: - Record the firmware's leaf tables when a locked root is mapped. - Accept a firmware-owned slot once, if its leaf table already translates every page Linux mapped there to the same physical address. The slot is never written; the hardware keeps walking the firmware's table. - Check later Linux mappings into a firmware-owned slot page by page and refuse any the firmware does not already provide. - Resolve IOVAs Linux does not map through those firmware tables, so the host can reach buffers the coprocessor shares later. Other DARTs and other SoCs keep the current behaviour.
iBoot leaves the T8142 (M5) display coprocessor running with macOS 26
("H17") firmware, mapped through locked DARTs. Add support for that
firmware generation and attach to the live session:
- Match apple,t8142-dcp and pin the H17 interface. Attach to the running
coprocessor with the standard RTKit wake handshake; never stop, reset
or reload it.
- Add the H17 IOMFB method and callback tables, with T8142 method
aliases, the nested-call reply handling, the AFK receive layout and the
service-init keys this firmware uses, and the DCP bandwidth and clock
requests answered from DT resources.
- Take the panel dimensions from the firmware at startup and keep the
mode the boot loader programmed. Only that mode is offered.
- Skip teardown calls whose H17 method numbers are not established, and
don't send AFK requests on H17, whose send format is unknown.
Linux loads no firmware here, and no panel timing, geometry, power model
or other calibration data is included. Optional properties the firmware
asks for are answered "not found".
Changes to shared code that alter behaviour (ACK reply buffers,
framebuffer release, EPIC service-init keys) are limited to H17
firmware; v12.3 and v13.5 keep their existing paths.
Co-authored-by: Dj <[email protected]>
Describe the J813 display coprocessor (DCP), its mailbox and both display DARTs, with resources read from this machine's Apple Device Tree, plus the dcp/disp0/disp0_piodma aliases the loader uses to hand over the live firmware mappings. The DCP and display DART stay disabled until the loader has reserved those mappings and enables them. Enable the Apple DRM driver in the J813 configuration and document the loader contract and the tested result. Tested on J813 from RAM with public m1n1 and U-Boot plus their J813 display and MTP companion changes: DCP completed startup and drove the internal panel at 2560x1600 (notch hidden) through appledrmfb, DPMS off/on cycles completed, and a KDE Plasma Wayland session ran with the built-in keyboard and trackpad. Rendering is software-only.
This was referenced Oct 3, 2026
This was referenced Nov 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add native display for the M5 MacBook Air (J813, T8142) on
aurora-wip. The internal panel is driven by the display coprocessor (DCP) through the Apple DRM driver instead of the boot framebuffer.apple,t8142-dart, a firmware-owned root slot is accepted when the firmware already translates every page Linux mapped there identically. Later mappings into it are checked page by page, and firmware-shared buffers resolve through the firmware tables. Other DARTs are unchanged.vrrflag could enable VRR swaps after a display re-report (every DPMS power-on) and stall page flips. Fixes 38c14f6.CONFIG_DRM_APPLE.No firmware is loaded, and no panel timing, geometry, power model or other calibration data is included. Optional properties the firmware requests are answered "not found". Based on DjDeveloperr's H17 DCP bring-up work.
Requires the companion m1n1 handoff and the U-Boot J813 MTP change (linked below).
Validation on J813, RAM-booted through public m1n1 and U-Boot plus those companions:
appledrmfbtook the console, keyboard and trackpad registered, no DART faults or warnings. A sixth was stopped by the test preflight before Linux because DCP had not yet settled.W=1build has no new warnings. checkpatch shows only the existingDCP_FW_NAMEmacro false positives.Rendering is software-only. GPU acceleration, backlight control, a cursor plane, external displays and suspend are not covered. Setup and the loader contract are in
Documentation/arch/arm64/apple-j813.rst.Companion PRs: #166 · aurora-silicon/m1n1#19 · aurora-silicon/u-boot#4