mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: imx8mm-phycore-som: Add CMA reserved memory region
@ 2026-12-01 11:04 Andrej Picej
  0 siblings, 0 replies; only message in thread
From: Andrej Picej @ 2026-12-01 11:04 UTC (permalink / raw)
  To: Frank Li, Sascha Hauer, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: kernel, Fabio Estevam, devicetree, imx, linux-arm-kernel,
	linux-kernel, upstream, Andrej Picej

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@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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-12-01 11:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-12-01 11:04 [PATCH] arm64: dts: imx8mm-phycore-som: Add CMA reserved memory region Andrej Picej

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®