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

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

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

跳至解决方案
1,972 次查看
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 项奖励
1 解答
1,753 次查看
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!
-----------------------------------------------------------------------------------------------------------------------

在原帖中查看解决方案

2 回复数
1,754 次查看
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,753 次查看
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 项奖励