clockworkpi / DevTerm

This code repository offers downloads for the latest images of various DevTerm models, as well as kernel patches, keyboard firmware, the source code for screen and printer drivers, hardware schematics, assembly instructions, and essential technical documents.
GNU Lesser General Public License v2.1
388 stars 68 forks source link

Document why the A06 gearbox doesn't reach maximum core speeds #7

Closed str4d closed 3 years ago

str4d commented 3 years ago

The A06 uses the RK3399, which has a maximum rated speed of 1.4 GHz for the A53 cores and 1.8 GHz for the A72 cores. This is also what is advertised on the DevTerm webpage:

image

The Armbian OS image shipped on the SD card with the A0604 (the one I received) defaulted to:

The devterm-a06-gearbox script is now what is recommended for managing CPU performance (incidentally, the default configuration on the Armbian OS image does not match any of the gears in the script).

However, the highest gear currently defined in devterm-a06-gearbox disables the A53 cores, and sets the A72 cores to only 1.2 GHz:

https://github.com/clockworkpi/DevTerm/blob/0192f9dfa4500037ca52e0acf0b71aea1c580e8a/Code/A06/devterm-a06-gearbox#L22-L24

Meanwhile, gear 3 (maximum utilization of the A53 cores) disables the A72 cores and sets the A53 cores to only 1008 MHz:

https://github.com/clockworkpi/DevTerm/blob/0192f9dfa4500037ca52e0acf0b71aea1c580e8a/Code/A06/devterm-a06-gearbox#L18-L20

It would be useful to add a code comment in the devterm-a06-gearbox script explaining how these gearings were selected. In particular, if the design of the DevTerm means that CPU should not be run at its rated maximum speeds (due to power consumption, cooling problems, or some other reason), then this should be documented, and the webpage should be updated to reflect the actual performance characteristics.

str4d commented 3 years ago

guu from ClockworkPi replied in the forum thread:

not limited

Based on various tests, we found that 5 levels can satisfy 90% of the applications

This is just a small tool based on experience. If you need it, you can set it up according to your needs. it’s just a python code

you can find the every cpu freq from /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies

also the gpu /sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu/available_frequencies

So what I suggest is:

We could also tweak the script to make user configuration of the gearings easier (i.e. store the gearings in a dictionary, and generate the mapping table etc. from it). This would also address #6 (by using the same constants to generate the helptext and configure the CPUs).