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,971件の閲覧回数
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.

ラベル(5)
0 件の賞賛
1 解決策
1,752件の閲覧回数
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,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!
-----------------------------------------------------------------------------------------------------------------------

1,752件の閲覧回数
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 件の賞賛