Overclocking, CMA, and config.txt parameters
Posted: Thu Mar 21, 2013 12:58 pm
I've had my Pi for a while now, but there are still some aspects which I can find little, and often contradictory, information about:
Overclocking:
With 'force_turbo=0', does the SoC scale up and down linearly between *_freq_min and *_freq, or is it a step-change from one value to the other? Linux has the ability (via cpufreq) to control the CPU frequency, but not (unless RPi-specific kenel-changes handle this) the GPU or RAM frequencies or the Voltage supplied. So what's the relationship between the SoC's frequency-control and the OS' frequency-control? Can either override the other, or is one counted only as an advisory value to the other?
Additionally, does the SoC have any logic which would allow it to fine-tune the frequencies to hit maximum performance (by whatever metric this is measured) - if the maximum frequencies are all turned up to 11, will the Pi stop at a safe maximum, or will the system crash?
CMA:
What is the relationship, if any, between the kernel's CMA system (for providing contiguous memory to devices for DMA purposes) and the RPi CMA feature (to relocate memory between ARM and GPU)? Should the amount of CMA memory specified in the kernel configuration be equal to or a multiple of the CMA setting in config.txt or the 'coherent_pool' setting on the command-line. It seems that 'cma=2M coherent_pool=2M' is a deprecated set of arguments, whilst 'coherent_pool=6M' is the current recommendation - why is this? What are the effects of lowering or increasing the coherent_pool figure? Is this a fixed amount, or should it scale with the amount of memory left to CMA.
Is there a deterministic way to calculate 'cma_offline_start'? With the fixup_x and start_x files in-use, the Pi crashes during early boot if 'cma_offline_start' is less than 26 (with lwm 16 & hvm 32).
The example given during this topic has 'cma=2M coherent_pool=2M' and 'gpu_mem_256=160', then states that:
config.txt parameters:
I've already had to use the undocumented (at http://elinux.org/RPiconfig, at least) 'cma_offline_start' parameter - what others exist? Is there a better resource than elinux.org with a canonical list? I'm also aware that it's possible to add 'start_file=start_x.elf'
and 'fixup_file=fixup_x.dat' to gain (in the former case, at least) additional firmware codecs - at the expense of requiring more dedicated GPU memory to boot. Are the differences between (and memory requirements of) the various fixup* and start* files documented anywhere? What do the *_cd* files do?
Thanks in advance,
Stuart
Overclocking:
With 'force_turbo=0', does the SoC scale up and down linearly between *_freq_min and *_freq, or is it a step-change from one value to the other? Linux has the ability (via cpufreq) to control the CPU frequency, but not (unless RPi-specific kenel-changes handle this) the GPU or RAM frequencies or the Voltage supplied. So what's the relationship between the SoC's frequency-control and the OS' frequency-control? Can either override the other, or is one counted only as an advisory value to the other?
Additionally, does the SoC have any logic which would allow it to fine-tune the frequencies to hit maximum performance (by whatever metric this is measured) - if the maximum frequencies are all turned up to 11, will the Pi stop at a safe maximum, or will the system crash?
CMA:
What is the relationship, if any, between the kernel's CMA system (for providing contiguous memory to devices for DMA purposes) and the RPi CMA feature (to relocate memory between ARM and GPU)? Should the amount of CMA memory specified in the kernel configuration be equal to or a multiple of the CMA setting in config.txt or the 'coherent_pool' setting on the command-line. It seems that 'cma=2M coherent_pool=2M' is a deprecated set of arguments, whilst 'coherent_pool=6M' is the current recommendation - why is this? What are the effects of lowering or increasing the coherent_pool figure? Is this a fixed amount, or should it scale with the amount of memory left to CMA.
Is there a deterministic way to calculate 'cma_offline_start'? With the fixup_x and start_x files in-use, the Pi crashes during early boot if 'cma_offline_start' is less than 26 (with lwm 16 & hvm 32).
The example given during this topic has 'cma=2M coherent_pool=2M' and 'gpu_mem_256=160', then states that:
The 96M figure is 256 - 160 = 96, but the 20M figure is 16M (hard-coded minimum) + 2M (cma) + 2M (coherent_pool)? Does this mean that with gnu_mem_256=192 and coherent_pool=6M, the GPU always gets 22M? Or, is the (deprecated?) 'cma' value now fixed (at 2M?) and so the GPU gets more? Does this relate to the cma_offline_start value required? Are there any other tricks which allow CMA to be used, but which minimise the amount of memory reserved for the GPU for what will generally be a headless system?ARM has 96M always. GPU has 20M always
config.txt parameters:
I've already had to use the undocumented (at http://elinux.org/RPiconfig, at least) 'cma_offline_start' parameter - what others exist? Is there a better resource than elinux.org with a canonical list? I'm also aware that it's possible to add 'start_file=start_x.elf'
and 'fixup_file=fixup_x.dat' to gain (in the former case, at least) additional firmware codecs - at the expense of requiring more dedicated GPU memory to boot. Are the differences between (and memory requirements of) the various fixup* and start* files documented anywhere? What do the *_cd* files do?
Thanks in advance,
Stuart