imx8mp: increase CMA Memory

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx8mp: increase CMA Memory

跳至解决方案
649 次查看
malik_cisse
Senior Contributor I

Hi,

How do I increase CMA memory size in imx8mp yocto BSP/device tree?

I have currently 640MiB allocated and I want to increase it as can be seen here:
~# dmesg | grep -i cma
[ 0.000000] Reserved memory: created CMA memory pool at 0x000000006a000000, size 640 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] Memory: 1034564K/2064384K available (18560K kernel code, 1644K rwdata, 7292K rodata, 3072K init, 552K bss, 374460K reserved, 655360K cma-reserved)

However the CMA size in the device tree does not correspond to 640MiB:
linux-imx/arch/arm64/boot/dts/freescale/imx8mp.dtsi

/* global autoconfigured region for contiguous allocations */

linux,cma {

compatible = "shared-dma-pool";

reusable;

size = <0 0x3c000000>;

alloc-ranges = <0 0x40000000 0 0xC0000000>;

linux,cma-default;

};


What is the correct way to increase this?
Thx

标签 (1)
0 项奖励
1 解答
619 次查看
brian14
NXP TechSupport
NXP TechSupport

Hi @malik_cisse,

Thank you for contacting NXP Support.

Using the device tree files as you have shown in your question is the best way to configure the CMA memory allocation. But, in this case, it seems that the CMA size is overwritten with other DTS please check your DTS file.
The DTSI file that you are referencing sets the size to 960MiB, you can try decreasing this value as a test and verify the proper function of the DTS file. Then, increase your custom value.

 

在原帖中查看解决方案

0 项奖励
2 回复数
609 次查看
malik_cisse
Senior Contributor I

Hi Brian,
>>the CMA size is overwritten with other DTS please check your DTS file.
Yes, this was exactly the case. I can now change CMA size.
Thanks

0 项奖励
620 次查看
brian14
NXP TechSupport
NXP TechSupport

Hi @malik_cisse,

Thank you for contacting NXP Support.

Using the device tree files as you have shown in your question is the best way to configure the CMA memory allocation. But, in this case, it seems that the CMA size is overwritten with other DTS please check your DTS file.
The DTSI file that you are referencing sets the size to 960MiB, you can try decreasing this value as a test and verify the proper function of the DTS file. Then, increase your custom value.

 

0 项奖励