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

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

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

Jump to solution
1,806 Views
erlend_eriksen
Contributor III

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.

0 Kudos
1 Solution
1,587 Views
igorpadykov
NXP Employee
NXP Employee

Hi Erlend

I believe you are right: "gpumem=" option specifies what amount of the

CMA memory is reserved for the VPU and GPU and it
would need to be lower than the "CONFIG_CMA_SIZE_MBYTES" .

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

2 Replies
1,588 Views
igorpadykov
NXP Employee
NXP Employee

Hi Erlend

I believe you are right: "gpumem=" option specifies what amount of the

CMA memory is reserved for the VPU and GPU and it
would need to be lower than the "CONFIG_CMA_SIZE_MBYTES" .

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,587 Views
erlend_eriksen
Contributor III

Thank you for your answer Igor.

Do you know how I would find the limit of how much contigous memory can be reserved on the imx6q? Can I use almost all of the total RAM, or is there some other limit?

Also, how do I verify that the requested amount of contigous memory is actually available / reserved for the VPU after having set the kernel options?

Best regards,

Erlend Eriksen

0 Kudos