[PATCH 2/4] arm64: dts: ti: k3-j784s4-j742s2-evm-common: Reserve 1920MiB of global CMA

From: Jayesh Choudhary
Date: Thu Apr 24 2025 - 04:47:11 EST


Reserve 1920MiB of global CMA pool which is also marked as re-usable
so that OS can also use this region if peripheral drivers are not
using it.

J784S4 has different multimedia components such as Camera, Dual-
Display and H264 Video Codec which uses CMA for buffer allocations.
Assuming the worst case scenario where all three run in parallel,
below is the calculation:

1) IMX390 camera sensor 1920x1080
-> 1920 width x 1080 height x 2 bytesperpixel x 4 buffers :
15.820 MiB which is ~16MiB
J784S4 can support 12 cameras so ~192MiB

2) 3840x2160@60fps MHDP via DisplayPort0
-> 3840 width x 2160 height x 4 bytesperpixel x 2 buffers :
63.281 MiB which is ~64 MiB

3) 2560x1440@60fps DSI via DisplayPort1
-> 2560 width x 1440 height x 4 bytesperpixel x 2 buffers :
28.125 MiB which is ~29 MiB

4) H264 Video Codec 1920x1080 resolution:
-> For 1080p resolution codec application, we require ~98-100 MiB
per channel. We require ~1600MiB for 16 channel codec application.

Total comes about 1885MiB. Adding 32MiB for other peripherals and
and additional 3MiB for rounding it off to 1920MiB.

Signed-off-by: Jayesh Choudhary <j-choudhary@xxxxxx>
---
arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi
index 2664f74a9c7a..33b54afe0a06 100644
--- a/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j784s4-j742s2-evm-common.dtsi
@@ -27,6 +27,14 @@ reserved_memory: reserved-memory {
#size-cells = <2>;
ranges;

+ /* global cma region */
+ linux,cma {
+ compatible = "shared-dma-pool";
+ reusable;
+ size = <0x00 0x78000000>;
+ linux,cma-default;
+ };
+
secure_ddr: optee@9e800000 {
reg = <0x00 0x9e800000 0x00 0x01800000>;
no-map;
--
2.34.1