AnsweredAssumed Answered

What is the difference between CONFIG_CMA_SIZE_MBYTES=128 and gpumem=128M?

Question asked by Erlend Eriksen on Feb 6, 2020
Latest reply on Feb 7, 2020 by Erlend Eriksen

I'm trying to increase the memory which is available / reserved for the VPU.

However, I'm confused over what is the correct way to achieve that.

 

I've seen references to the "gpumem=128M" option, which you are supposed to add to the kernel command line to increase the memory available to the gpu and vpu. Ref: https://community.nxp.com/docs/DOC-93591/version/5 .

 

I've also seen references to the "CONFIG_CMA_SIZE_MBYTES" option, which is set as a menuconfig build option to the kernel. This option sets the reserved contiguous memory size, which is for DMA. However, surely the "gpumem" command line option also refers to DMA-able memory since it is supposed to be reserved for the GPU and VPU.

 

What is the difference between the two options, and how do they relate to each other? Do I need to set both of them or only one, etc.

 

Maybe "CONFIG_CMA_SIZE_MBYTES" sets the amount of memory that is available  to the VPU (and GPU etc.), while the "gpumem=" option specifies what amount of the CMA memory is reserved for the VPU and GPU? In that case, I guess the "gpumem" option woul need to be lower than the "CONFIG_CMA_SIZE_MBYTES" option.

Outcomes