]> git.ipfire.org Git - thirdparty/linux.git/commit
arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of global CMA
authorDevarsh Thakkar <devarsht@ti.com>
Thu, 13 Jun 2024 15:09:00 +0000 (20:39 +0530)
committerVignesh Raghavendra <vigneshr@ti.com>
Wed, 3 Jul 2024 14:21:21 +0000 (19:51 +0530)
commit9e8560556f9c41da28118af3385b4e9dc832ae2b
tree2e0ddc0eb21d8f4d9e437ff0e60d1aef4b2e37d0
parentcf645197f045147cd0232c7a205cdfed49590756
arm64: dts: ti: k3-am62x-sk-common: Reserve 128MiB of global CMA

Reserve 128MiB of global CMA which is also marked as re-usable
so that OS can also use the same if peripheral drivers are not using the
same.

AM62x supports multimedia components such as GPU, dual Display and Camera.
Assuming the worst-case scenario where all 3 are run in parallel below
is the calculation :

1) OV5640 camera sensor supports 1920x1080 resolution
-> 1920 width x 1080 height x 2 bytesperpixel x 8 buffers
   (default in yavta) : 32MiB

2) 1920x1200 Microtips LVDS panel supported
-> 1920 width x 1080 height x 4 bytesperpixel x 2 buffers :
   16 MiB

3) 1920x1080 HDMI display supported
-> 1920 width x 1080 height x 4 bytesperpixel x 2 buffers :
   15.82 MiB which is ~16 MiB

4) IMG GPU shares with display allocated buffers while rendering
   but in case some dedicated operation viz color conversion,
   keeping same window of ~16 MiB for GPU too.

Total is 80 MiB and adding 32 MiB for other peripherals and extra
16 MiB to keep as buffer for fragmentation thus rounding total to 128
MiB.

Signed-off-by: Devarsh Thakkar <devarsht@ti.com>
Reviewed-by: Randolph Sapp <rs@ti.com>
Link: https://lore.kernel.org/r/20240613150902.2173582-2-devarsht@ti.com
Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
arch/arm64/boot/dts/ti/k3-am62x-sk-common.dtsi