From 095c2f3aeb0636af5b4feca576bbd1129ca4ad2e Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Fri, 30 Oct 2026 17:51:03 -0400 Subject: [PATCH 1/5] arm64: dts: apple: t6040: Drop dma-noncoherent from the display subsystem The J616s display-subsystem node says dma-noncoherent, but on 7.3 the CLIDR_EL1.LoC == 0 override has made it coherent anyway, and the J616s display has only ever run that way, as have its dcp and piodma nodes. Remove the property so the display keeps the coherent setup it was brought up on once the arm64 DMA code respects an explicit dma-noncoherent property again. A non-coherent J616s display can be qualified separately. No change in behaviour. Signed-off-by: Erik Bourget --- arch/arm64/boot/dts/apple/t6040.dtsi | 1 - 1 file changed, 1 deletion(-) diff --git a/arch/arm64/boot/dts/apple/t6040.dtsi b/arch/arm64/boot/dts/apple/t6040.dtsi index 961af1b7b5bd4..b909d0c197f77 100644 --- a/arch/arm64/boot/dts/apple/t6040.dtsi +++ b/arch/arm64/boot/dts/apple/t6040.dtsi @@ -522,7 +522,6 @@ display: display-subsystem { compatible = "apple,display-subsystem"; iommus = <&disp0_dart 0>; - dma-noncoherent; status = "disabled"; }; From 2b32d51154ce2f567b40f023d0a208564e34b5cd Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Fri, 30 Oct 2026 16:00:35 -0400 Subject: [PATCH 2/5] arm64: mm: Keep explicitly dma-noncoherent devices non-coherent when LoC == 0 Commit 233b5554e07b ("arm64: mm: Treat all devices as dma-coherent when CLIDR_EL1.LoC == 0") makes every device coherent when CLIDR_EL1.LoC is zero, including devices whose firmware node says "dma-noncoherent". Apple T8132 (M4) reports LoC == 0, so on 7.3 every M4 device becomes coherent. The J713 G16 GPU and DCP display paths were brought up and qualified on non-coherent DMA only, and they refuse coherent devices by design: asahi_g16_dma_unsupported() fails G16 admission, and apple_dart_dcp_shared_pair() returns -ENODEV for the DCP D451 memory callback, so IOMFB startup fails. A J713 on integration/aurora boots with no GPU and no display. Respect an explicit "dma-noncoherent" property and apply the LoC rule only to devices without one. Devices with no annotation are still treated as coherent. The change only matters where the LoC rule applies, on CPUs that report LoC == 0. The other arm64 device trees that use dma-noncoherent are Allwinner, NXP and Rockchip SoCs, whose Cortex-A55/A76 CPUs report a non-zero LoC, so the rule never applies to them. The T6040 display subsystem drops its annotation in the previous patch, so nothing else changes. The once-per-boot notice for the LoC rule now names the exception. Tested on J713 (MacBook Air 13" M4, 8-core GPU). Signed-off-by: Erik Bourget --- arch/arm64/mm/dma-mapping.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arch/arm64/mm/dma-mapping.c b/arch/arm64/mm/dma-mapping.c index e517dddb37499..a835ed06cba0d 100644 --- a/arch/arm64/mm/dma-mapping.c +++ b/arch/arm64/mm/dma-mapping.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -42,12 +43,17 @@ void arch_setup_dma_ops(struct device *dev, bool coherent) { int cls = cache_line_size_of_cpu(); - if (!coherent && !CLIDR_LOC(read_sysreg(clidr_el1))) { + /* + * A device explicitly marked "dma-noncoherent" keeps non-coherent DMA: + * its driver may depend on the non-cacheable attributes of that path. + */ + if (!coherent && !CLIDR_LOC(read_sysreg(clidr_el1)) && + !device_property_present(dev, "dma-noncoherent")) { /* - * This holds for every device on the system, so say it once + * This holds for every other device on the system, so say it once * and keep the per-device line for debugging. */ - pr_info_once("CLIDR_EL1.LoC == 0, treating all devices as DMA coherent\n"); + pr_info_once("CLIDR_EL1.LoC == 0, treating devices not marked dma-noncoherent as DMA coherent\n"); dev_dbg(dev, "CLIDR_EL1.LoC == 0, treating as coherent\n"); coherent = true; } From 4933e3e462afe14e5d9e0bf75b18273b9e1be1d3 Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Sat, 24 Oct 2026 13:43:11 -0400 Subject: [PATCH 3/5] arm64: dts: apple: t8132-j713: Mark GPU and DCP dma-noncoherent The J713 G16 GPU, DCP, PIODMA and display scanout drivers only support non-coherent DMA and refuse coherent devices. Before 7.3 that was the arm64 default. Since commit 233b5554e07b ("arm64: mm: Treat all devices as dma-coherent when CLIDR_EL1.LoC == 0"), T8132 devices become coherent unless their node says otherwise. Mark these nodes dma-noncoherent so they keep the DMA path they were qualified on. Signed-off-by: Erik Bourget --- arch/arm64/boot/dts/apple/t8132-j713-display.dtsi | 5 +++++ arch/arm64/boot/dts/apple/t8132-j713-gpu.dtsi | 2 ++ 2 files changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/apple/t8132-j713-display.dtsi b/arch/arm64/boot/dts/apple/t8132-j713-display.dtsi index d35e9fc89a2a3..e3cb6864c54d6 100644 --- a/arch/arm64/boot/dts/apple/t8132-j713-display.dtsi +++ b/arch/arm64/boot/dts/apple/t8132-j713-display.dtsi @@ -16,6 +16,8 @@ * frontend mappings it adds memory-region and apple,j713-inherited-mappings * to piodma and display-subsystem and enables them and disp0_dart. * apple,j713-native-piodma and apple,j713-native-scanout opt in to that. + * The DCP, PIODMA and scanout paths use non-coherent DMA only, so those + * nodes are marked dma-noncoherent. * The DART driver also reads the ADT through the loader's phram "adt" * region. Without that handoff the DCP and frontend are refused. * @@ -81,6 +83,7 @@ mbox-names = "mbox"; iommus = <&dcp_dart 23>; power-domains = <&ps_disp_cpu>; + dma-noncoherent; apple,j713-native-piodma; apple,j713-native-scanout; /* Full 2560x1664 panel including the notch rows, 224 ppi. */ @@ -91,6 +94,7 @@ disp0_piodma: piodma { iommus = <&disp0_dart 16>; + dma-noncoherent; status = "disabled"; /* Enabled by the loader. */ }; }; @@ -98,6 +102,7 @@ display: display-subsystem { compatible = "apple,t8132-display-subsystem", "apple,t8132-display-diagnostics"; iommus = <&disp0_dart 0>; + dma-noncoherent; status = "disabled"; /* Enabled by the loader. */ }; }; diff --git a/arch/arm64/boot/dts/apple/t8132-j713-gpu.dtsi b/arch/arm64/boot/dts/apple/t8132-j713-gpu.dtsi index 7cddbaf1e5b56..7db8d5a4c16b7 100644 --- a/arch/arm64/boot/dts/apple/t8132-j713-gpu.dtsi +++ b/arch/arm64/boot/dts/apple/t8132-j713-gpu.dtsi @@ -69,6 +69,8 @@ reg-names = "asc", "sgx"; mboxes = <&agx_mbox>; power-domains = <&ps_gfx>; + /* G16 is admitted on non-coherent DMA only. */ + dma-noncoherent; apple,pmp = <&pmp>; memory-region = <&gpu_ttbs>, <&gpu_pagetables>, <&gpu_handoff>, <&gpu_shared_l2>, <&gpu_fw_text>, <&gpu_fw_data>; From ec3215d8470e06c4d61194e59f1aee4983634bab Mon Sep 17 00:00:00 2001 From: Ryan Murray Date: Sun, 25 Oct 2026 11:11:09 +1100 Subject: [PATCH 4/5] dt-bindings: gpu: apple,agx: allow explicit non-coherent DMA The J713 GPU now declares dma-noncoherent to retain its qualified DMA path on CPUs with LoC zero. Permit that standard property in the GPU binding so the device tree validates against the same contract. Assisted-by: LLM Signed-off-by: Ryan Murray --- Documentation/devicetree/bindings/gpu/apple,agx.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/gpu/apple,agx.yaml b/Documentation/devicetree/bindings/gpu/apple,agx.yaml index f5b1afd7d7dd3..2004c43d42b1d 100644 --- a/Documentation/devicetree/bindings/gpu/apple,agx.yaml +++ b/Documentation/devicetree/bindings/gpu/apple,agx.yaml @@ -40,6 +40,8 @@ properties: power-domains: maxItems: 1 + dma-noncoherent: true + mboxes: minItems: 1 maxItems: 2 From 6832149d632ffe97b7ed379dd40eefd610fb7ca0 Mon Sep 17 00:00:00 2001 From: Erik Bourget Date: Mon, 26 Oct 2026 10:33:48 -0400 Subject: [PATCH 5/5] dt-bindings: display: apple,dcp: allow explicit non-coherent DMA The J713 DCP controller and its piodma child declare dma-noncoherent to keep the non-coherent DMA path they were qualified on when the CPU reports LoC zero. Permit that standard property at both levels so the J713 device tree validates. Signed-off-by: Erik Bourget --- Documentation/devicetree/bindings/display/apple,dcp.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/display/apple,dcp.yaml b/Documentation/devicetree/bindings/display/apple,dcp.yaml index 38be82bc7d1bd..dbb2234164d7e 100644 --- a/Documentation/devicetree/bindings/display/apple,dcp.yaml +++ b/Documentation/devicetree/bindings/display/apple,dcp.yaml @@ -72,6 +72,8 @@ properties: power-domains: maxItems: 1 + dma-noncoherent: true + resets: maxItems: 1 @@ -299,6 +301,7 @@ properties: properties: iommus: maxItems: 1 + dma-noncoherent: true memory-region: minItems: 1 maxItems: 64