[PATCH] arm64: dts: imx8mm-phycore-som: Add CMA reserved memory region

Andrej Picej andrej.picej at norik.com
Tue Dec 1 03:04:41 PST 2026


Without a linux,cma node the kernel falls back to CONFIG_CMA_SIZE_MBYTES,
which is only 32 MiB with the arm64 defconfig. That is not enough for the
display, GPU (etnaviv) and VPU (hantro) buffers and leads to failing
contiguous allocations on phyCORE-i.MX8MM based boards.

Thus add a 256 MiB default CMA pool. Allow it anywhere below 4 GiB, so it
fits all RAM variants of the SoM.

Signed-off-by: Andrej Picej <andrej.picej at norik.com>
---

Notes:
    Why in DT: the i.MX8MM has no IOMMU, so display and VPU buffers depend
    on CMA and the SoM should work without a special kernel config or
    bootloader setup. "cma=" still overrides it. Same approach as
    imx93-phycore-som.dtsi and imx8mm-tqma8mqml.dtsi.
    
    Peak CMA usage measured on phyBOARD-Polis-i.MX8MM:
      idle / display, GPU load    15 MiB
      1080p H.264 / HEVC decode   59 / 49 MiB
      4K HEVC decode             138 MiB
      4K VP9 decode              242 MiB

---

 .../boot/dts/freescale/imx8mm-phycore-som.dtsi     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi
index b764f7734868..e5b29fa75b95 100644
--- a/arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mm-phycore-som.dtsi
@@ -28,6 +28,20 @@ reg_vdd_3v3_s: regulator-vdd-3v3-s {
 		regulator-min-microvolt = <3300000>;
 		regulator-name = "VDD_3V3_S";
 	};
+
+	reserved-memory {
+		ranges;
+		#address-cells = <2>;
+		#size-cells = <2>;
+
+		linux,cma {
+			compatible = "shared-dma-pool";
+			reusable;
+			alloc-ranges = <0 0x40000000 0 0xc0000000>;
+			size = <0 0x10000000>;
+			linux,cma-default;
+		};
+	};
 };
 
 &A53_0 {

base-commit: 4fd36177c1281252290436f27a034d4473aa2744
-- 
2.34.1




More information about the linux-arm-kernel mailing list