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
Solved! Go to Solution.
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.
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
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.