2

The post at http://www.raspberrypi.org/phpBB3/viewtopic.php?f=29&t=19334&p=218282&hilit=cma#p217665 mentions that:-

gpu_mem_512=316
cma_lwm=16
cma_hwm=32

In the above ARM has 96M always. GPU has 20M always. The rest is CMA.

How is this calculation being done?

  • just curious - what's CMA? might need to create a tag for it if there'll be a lot of questions about it – nc4pk May 18 '13 at 15:32
  • @tapped-out As I understand CMA is part of the latest Pi kernels and it reserves some memory as per configuration. Based on above configs it will transfer the memory to either GPU or ARM. – AppleGrew May 18 '13 at 16:33
1

it's a typo, should read 416:

gpu_mem_256=160
gpu_mem_512=416

256 - 160 = 96MB, 512 - 416 = 96MB.

6

CMA dynamically allocates memory to the GPU as required. When the amount of free memory available to the GPU falls below the 'low water mark' (cma_lwm), CMA will attempt to re-allocate some of the memory currently available to the ARM to be instead reserved for the GPU. You can think of this as 'minimum free memory' for the GPU.

If the GPU later frees up some resources and finds itself with additional memory available above the 'high water mark' (cma_hwm), the excess memory will be allocated instead to the ARM. You can think of this as 'maximum free memory' for the GPU.

The ARM basically gets whatever memory is left in the pool. In order for CMA to work you will need to add the following line to your cmdline.txt (in addition to and separate from the config options in your config.txt):

coherent_pool=6M smsc95xx.turbo_mode=N

The RPiconfig wiki page has additional information.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.