Skip to content

arm64: dts: apple: constrain T8103 external display DMA windows - #179

Merged
maralcbr merged 1 commit into
omacom:integration/aurorafrom
claytonfaria:fix/t8103-display-dma-window
Oct 25, 2026
Merged

maralcbr merged 1 commit into
omacom:integration/aurorafrom
claytonfaria:fix/t8103-display-dma-window

Conversation

@claytonfaria

Copy link
Copy Markdown

On J313, the external display DMA windows exceed the T8103 DART's 32-bit input-address space. The driver rejects them, native display binding fails, and Hyprland falls back to simpledrm despite working M1 GPU rendering.

Limit the external scanout and PIODMA windows to 0xfc000000, matching the existing internal-display window. This changes only the lengths in t8103-jxxx.dtsi and t8103.dtsi; stream IDs and DART references stay the same. A J313-only overlay with these equivalent property changes restored native apple-drm / eDP-1 after reboot on linux-aurora 7.2.10.aurora2-1 with Aura.

Closes #178.

Validation

  • Compiled all five T8103 board trees (J274, J293, J313, J456, J457), before and after, using the installed Aurora kernel's DTC (its GPU properties require floating-point support absent from the distribution's ordinary DTC).
  • Compared parsed DTBs: only the two intended existing properties change for every board; DART phandles are preserved. Resulting display windows fit 32 bits and are 16 KiB aligned. No new DTC warnings.
  • git diff --check and scripts/checkpatch.pl --no-tree: pass, zero errors/warnings.
  • Real J313 hardware, equivalent overlay on the installed kernel: both DCPs bind; native internal display at 2560×1600/60 Hz; previous invalid-DMA-window and RTKit startup errors absent; installed boot-chain verification passes.
  • M1 EGL known-color pixel readback passes. Wayland presentation feedback: 59.94 FPS steady animation and 59.88 FPS during eight window open/close cycles, no discarded frames or new GPU/display faults. Detailed measurements and versions are in J313: oversized T8103 external display DMA windows force simpledrm fallback #178.

Limits

The exact branch kernel has not been built or booted; hardware validation used equivalent DT properties through a local overlay. Full kernel/schema CI is pending. External display output/hotplug, suspend/resume, a separate cold boot and other M1 hardware remain untested. Their DTBs compile, but that is not a hardware qualification claim.

This is the source correction for the temporary overlay, not a proposal to ship that overlay as another package. No changes to the DART driver's validation or to Aura are needed for this fix.

The T8103 display DART has a 32-bit input address space, but the
external display and its PIODMA client request a 0xfffff0000-byte
window. apple_dart_parse_dma_window() rejects it with "Invalid DMA
window for ias=32".

On J313 this prevents the shared display master from binding and
leaves the compositor on simpledrm even though the M1 GPU renders
successfully. Limit both external display windows to 0xfc000000,
matching the existing internal display window and preserving the
DART references and stream IDs.

An equivalent J313 overlay restored native apple-drm output and
both DCP bindings after reboot on linux-aurora 7.2.10.aurora2-1.
External display output and other M1 boards remain untested.

Closes: omacom#178
Signed-off-by: Clayton Faria <claytonfaria@gmail.com>
@ludagoo

ludagoo commented Oct 22, 2026

Copy link
Copy Markdown

Independent confirmation from a second MacBook Air (M1, 2020) J313, found while working on the mic regression (#141). I diagnosed the same two windows before seeing this PR; my patch is byte-identical to yours, so I am not opening a second one. Facts that complement the validation section:

Same result here, and the source change produces the same DTB. I booted the shipped 7.2.10 t8103-j313.dtb with an equivalent overlay (the same method as your test) on a kernel built from the 7.2.10 pin (1b4997b):

apple-drm soc:display-subsystem: bound 231c00000.dcp (ops dcp_comp_ops [appledrm])
apple-drm soc:display-subsystem: bound 271c00000.dcp (ops dcp_comp_ops [appledrm])
apple-drm soc:display-subsystem: bound 238334000.audio-controller (ops dcpaud_comp_ops [appledrm])
apple-drm soc:display-subsystem: [drm] fb0: appledrmfb frame buffer device

No Invalid DMA window, no dcp_comp_unbind warning. /sys/class/backlight/apple-panel-bl is present and brightnessctl changes the panel level; before the fix /sys/class/backlight was empty and Omarchy reported a fixed brightness. I also applied this exact two-line change to the 7.2.10 source and ran make dtbs with the kernel's own DTC: the resulting t8103-j313.dtb decompiles identically to the shipped DTB with the overlay applied, so the overlay test stands in for the branch DTB on J313. Mic, SEP and GPU were unaffected. This was a warm reboot, not a cold boot.

Stock kernel fails the same way. The journal of linux-aurora 7.2.10.aurora1-2 (kernel 7.2.10-1-2-ARCH) on this machine has the same three Invalid DMA window for ias=32 lines and the simpledrm fallback on every boot, so the regression is in 7.2.10.aurora1 already, not only aurora2.

Origin of the value. 0x0 0x0 0xf 0xffff0000 is the T8112 window; the T8112 DARTs have the larger input-address space. Upstream Asahi (asahi-wip) carries 0x0 0x0 0x0 0xfc000000 for both T8103 users, which is what this PR restores. The value entered integration/aurora with the 7.2.10 rebase (#139): commit f6ac4a6 ("arm64: dts: apple: route base M1/M2 displays to both Type-C ports", adaptation note: "the t8103/t8112 display DARTs take five iommu cells in asahi-wip; use their apertures for the display iommus") converted the old two-cell <&dispext0_dart 0> to the five-cell form and used the T8112 aperture for the T8103 as well. The 7.1.12 trees (aurora2, aurora8) still had the two-cell form, which is why the display worked there.

One note for the commit message: the window is rejected by apple_dart_parse_dma_window() because it exceeds ias = 32, so "constrain" is accurate, but it may be worth saying that this restores the upstream value rather than choosing a new one.

@joshuaswarren

Copy link
Copy Markdown

Tested on the lab laptops as part of a combined hand build (also carrying 186, 183, 202). Posted here for 179.

What was built

  • Head tested: 1002719 (t8103.dtsi and t8103-jxxx.dtsi, blob-verified against the compare API).
  • Combined hand build, release 7.2.11-newprs-ARCH+ (sha256 3c0cab28f7532a88a2a5828ea9f3d69612a48fbc1ee8cd464a4f1b8a22c017f5), make dtbs clean including the T8103 device trees with these two files at head content.
  • Base tree: the 7.2.11 base d8ecb2e (plus the drm/apple sibling files noted in the 183 thread, which do not touch dts). This PR's base (70d5dce) is an ancestor of that base, so the build base is newer than the PR base; the two dts files themselves are the exact head blobs.
  • CI at time of posting: no checks reported on the branch yet.

Results
| Machine | SoC | boot id (candidate) | boots | result |
| 13-inch M1 MacBook Pro | T8103 | e8c0ca63-b566-444f-b2af-25ecce9982f6 | yes | PASS |
| 14-inch M2 Max MacBook Pro | T6021 | 64a04d28-8325-4ffc-8bfc-06b1e2d447d7 | yes | PASS |

Both machines boot the combined kernel one-shot, 0 failed units, smoke equal to the same machine's own stock baseline, no new dmesg error class (only known flake classes), DART probe lines normal (containment armed, PCIe-C ordered before DART resume, no DART faults on either boot).

Scope honesty, important for this PR: the changed files are device tree sources for T8103, and on these machines the DTBs that actually boot are built by the boot chain packaging (m1n1/boot.bin), not shipped in the kernel package - so the boot test proves the kernel with these files compiled and everything else still works, but the modified DMA windows themselves were NOT exercised at runtime (the boot chain still used the packaged DTBs). The t8103.dtb/t8103-jxxx dtb artifacts from this build did compile without error or warning. The 13-inch M1 (T8103) is the only T8103 machine in this fleet; the M2 (T6021) boot covers the regression side only (this PR does not touch T6021 files).

Regressions: none found. The 16-inch M1 Max run is pending (its lab window was taken by other tests); I will add one line to this comment thread when it ran.

@maralcbr maralcbr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @claytonfaria, and @ludagoo for the independent J313 confirmation. The fix is right.

  • T8103's display DARTs are T8020-type with ias = 32 (drivers/iommu/apple-dart.c:2992-2996), and apple_dart_parse_dma_window() rejects any window that crosses that (:2207-2210). 0xf 0xffff0000 ends at 0xf_fffeffff; 0x0 0xfc000000 ends at 0xfbffffff, is 16 KiB aligned, and matches disp0_dart, dcpext's own window (t8103.dtsi:1598) and Asahi's asahi-wip PIODMA entry. The old value is T8112's aperture (T8110-type DARTs have the wider IAS), carried over in f6ac4a6 for &display and in 7b2ee5d for PIODMA.
  • Because &display lists both DARTs and xlate intersects their windows, the rejected dispext entry breaks the display master's IOMMU configuration as a whole, which is why the internal panel fell back to simpledrm too, not just external output. With the fix the common window is unchanged (disp0 was already 0xfc000000), and I found nothing in drivers/gpu/drm/apple that needs IOVAs above it: iomfb_template.c allocates through dcpext and maps the same IOVA into PIODMA.
  • All five T8103 boards (J274, J293, J313, J456, J457) include t8103-jxxx.dtsi without overriding these, so they all inherit the bad description and all get the fix. Nothing outside T8103 changes, and no other T8103 or apple,t6000-dart user has an oversized window left.

How it reaches users: the package installs the DTBs into /usr/lib/modules/<kver>-ARCH/dtbs, update-m1n1 takes the newest kernel's DTBs (the selector omarchy-mac-boot's dtb-overlays.sh checks for), and asahi-scripts' 95-m1n1-install.hook rebuilds boot.bin on the kernel upgrade. So a one-shot boot of a hand-built kernel doesn't exercise this (the DTB comes from boot.bin); the overlay runs do, and the branch DTB decompiles identically to the overlaid one.

Small ask for the commit message: say it restores Asahi's T8103 value rather than picking a new one.

Approving; I'll merge once Kernel CI is green and pin it. Before release we still need, on the packaged kernel with any local overlay removed:

  • an M1 cold boot from the regenerated boot.bin, with both changed windows visible under /sys/firmware/devicetree/base and the package/boot.bin versions recorded
  • apple-drm bound, console and desktop handoff, backlight, no new DART or display faults
  • external display on both USB-C ports, plus HDMI on a J274 if anyone has one
  • suspend/resume

The iMacs (J456/J457) and J274 HDMI stay untested unless someone has one; I'll note that as a gap rather than block on it.

&display {
iommus = <&disp0_dart 0 0x0 0x0 0x0 0xfc000000>,
<&dispext0_dart 0 0x0 0x0 0xf 0xffff0000>;
<&dispext0_dart 0 0x0 0x0 0x0 0xfc000000>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right value: this is T8112's aperture, and T8103's DARTs have a 32-bit IAS, so the old entry failed xlate and took the internal panel down with it. Now it matches disp0_dart above, so the intersected window is unchanged.


piodma {
iommus = <&dispext0_dart 4 0x0 0x0 0xf 0xffff0000>;
iommus = <&dispext0_dart 4 0x0 0x0 0x0 0xfc000000>;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Matches dcpext's own window (line 1598) and Asahi's asahi-wip PIODMA entry; iomfb_template.c maps the same dcpext IOVA here, so nothing needs addresses above 0xfc000000.

@maralcbr
maralcbr added this pull request to the merge queue Oct 25, 2026
Merged via the queue into omacom:integration/aurora with commit 99cb1a7 Oct 25, 2026
12 checks passed
ryanrhughes pushed a commit to omacom/omarchy-pkgs that referenced this pull request Oct 25, 2026
Picks up the T8103 display DMA window fix (omacom/linux-aurora#179),
which lets the M1 display driver bind instead of falling back to
simpledrm.
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.

J313: oversized T8103 external display DMA windows force simpledrm fallback

4 participants