Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello,
For the Verdin iMX8M Plus module, adjusting the GPU memory size involves configuring the Contiguous Memory Allocator (CMA) size, as the GPU memory in this context is allocated from the CMA pool. The default CMA size is determined by the BSP settings, and for the Verdin iMX8M Plus, it is set to a maximum of 256MB or 25% of the DDR size, whichever is smaller, as per the BSP release notes you’ve referenced.
Since you’ve attempted to adjust the GPU memory size using the gpumem
kernel parameter and modifying the Device Tree without success, it’s important to note that these methods might not directly influence the CMA allocation for the GPU. Instead, you should focus on adjusting the CMA size itself to provide more memory to the GPU.
To increase the CMA size for your Verdin iMX8M Plus module, you should:
-
Modify the Kernel Boot Parameters: You can adjust the CMA size by passing a boot parameter to the kernel. This is done by adding
cma=<size>M
to the kernel command line, where<size>
is the desired size in megabytes. For example, to set the CMA size to 512MB, you would addcma=512M
to the kernel command line. This can be done in the U-Boot environment or through your bootloader configuration. -
Reconfigure the Device Tree: If the CMA size is defined within the Device Tree for your specific module, you may need to adjust it there as well. However, based on the context provided, the primary method for adjusting the CMA size on the Verdin iMX8M Plus should be through the kernel boot parameters rather than the Device Tree.
-
Verify Changes: After making these changes, you should verify that the CMA size has been successfully increased by checking the kernel boot logs for messages indicating the allocated CMA size. Additionally, using tools like
clinfo
to check the available GPU memory should reflect the changes.
Yes, the GPU shares the DRAM with the CPU in this architecture. The CMA is used to allocate a contiguous block of memory in the DRAM that can be used by the GPU, ensuring that large buffers for graphics operations can be accommodated.
Please ensure that any changes made to the kernel command line or Device Tree are compatible with your system’s configuration and that you have backups of any files you modify.
Best regards,
Toradex AI
Please, also check if these links can help you solve your problem:
Contiguous Memory Allocator - CMA (Linux) | Toradex Developer Center.