Repository navigation
Conversation
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>
|
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 No Stock kernel fails the same way. The journal of Origin of the value. One note for the commit message: the window is rejected by |
|
Tested on the lab laptops as part of a combined hand build (also carrying 186, 183, 202). Posted here for 179. What was built
Results 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
left a comment
There was a problem hiding this comment.
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), andapple_dart_parse_dma_window()rejects any window that crosses that (:2207-2210).0xf 0xffff0000ends at0xf_fffeffff;0x0 0xfc000000ends at0xfbffffff, is 16 KiB aligned, and matchesdisp0_dart,dcpext's own window (t8103.dtsi:1598) and Asahi'sasahi-wipPIODMA entry. The old value is T8112's aperture (T8110-type DARTs have the wider IAS), carried over in f6ac4a6 for&displayand in 7b2ee5d for PIODMA. - Because
&displaylists 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 already0xfc000000), and I found nothing indrivers/gpu/drm/applethat needs IOVAs above it:iomfb_template.callocates through dcpext and maps the same IOVA into PIODMA. - All five T8103 boards (J274, J293, J313, J456, J457) include
t8103-jxxx.dtsiwithout overriding these, so they all inherit the bad description and all get the fix. Nothing outside T8103 changes, and no other T8103 orapple,t6000-dartuser 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/baseand 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>; |
There was a problem hiding this comment.
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>; |
There was a problem hiding this comment.
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.
99cb1a7
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.
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 int8103-jxxx.dtsiandt8103.dtsi; stream IDs and DART references stay the same. A J313-only overlay with these equivalent property changes restored nativeapple-drm/eDP-1after reboot onlinux-aurora 7.2.10.aurora2-1with Aura.Closes #178.
Validation
git diff --checkandscripts/checkpatch.pl --no-tree: pass, zero errors/warnings.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.