summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorUdo Schläpfer <rockbox-2014.10@desktopwarrior.net>2014-12-13 20:45:03 +0100
committerGerrit Rockbox <gerrit@rockbox.org>2015-01-30 20:15:21 +0100
commit6d3dc8fce0401da24ad45593e4eb9a68e2cde297 (patch)
tree48e61a3d6a99141dc2b1e6cf6037adbd0e58f056 /apps
parent572b36a51a7796e88c11cf0658ced40c1a6efece (diff)
downloadrockbox-6d3dc8fce0401da24ad45593e4eb9a68e2cde297.tar.gz
rockbox-6d3dc8fce0401da24ad45593e4eb9a68e2cde297.zip
iBasso DX50/DX90: CPU info enhancements.
System -> Debug (Keep Out) -> View CPU stats Will now show the current cpufreq scaling governor, minimum, current and maximum cpufreq scaling frequency for each CPU. This may be genric for Android kernel based devices but is only enabled for iBasso Devices. Other maintainers may choose do adopt this. Change-Id: I53e212f8707bf2abaa557e297293fb559ac37058
Diffstat (limited to 'apps')
-rw-r--r--apps/debug_menu.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/apps/debug_menu.c b/apps/debug_menu.c
index 75e23b3945..e602b713c3 100644
--- a/apps/debug_menu.c
+++ b/apps/debug_menu.c
@@ -244,6 +244,23 @@ static const char* get_cpuinfo(int selected_item, void *data,
244 { 244 {
245 int cpu = (selected_item - 5) / (state_count + 1); 245 int cpu = (selected_item - 5) / (state_count + 1);
246 int cpu_line = (selected_item - 5) % (state_count + 1); 246 int cpu_line = (selected_item - 5) % (state_count + 1);
247#if defined(DX50) || defined(DX90)
248 int min_freq = min_scaling_frequency(cpu);
249 int cur_freq = current_scaling_frequency(cpu);
250 int max_freq = max_scaling_frequency(cpu);
251 char governor[20];
252 bool have_governor = current_scaling_governor(cpu, governor, sizeof(governor));
253 if(cpu_line == 0)
254 {
255 sprintf(buffer,
256 " CPU%d: %s: %d/%d/%d MHz",
257 cpu,
258 have_governor ? governor : "Min/Cur/Max freq",
259 min_freq > 0 ? min_freq/1000 : -1,
260 cur_freq > 0 ? cur_freq/1000 : -1,
261 max_freq > 0 ? max_freq/1000 : -1);
262 }
263#else
247 int freq1 = frequency_linux(cpu, false); 264 int freq1 = frequency_linux(cpu, false);
248 int freq2 = frequency_linux(cpu, true); 265 int freq2 = frequency_linux(cpu, true);
249 if (cpu_line == 0) 266 if (cpu_line == 0)
@@ -252,6 +269,7 @@ static const char* get_cpuinfo(int selected_item, void *data,
252 freq1 > 0 ? freq1/1000 : -1, 269 freq1 > 0 ? freq1/1000 : -1,
253 freq2 > 0 ? freq2/1000 : -1); 270 freq2 > 0 ? freq2/1000 : -1);
254 } 271 }
272#endif
255 else 273 else
256 { 274 {
257 cpustatetimes_linux(cpu, states, ARRAYLEN(states)); 275 cpustatetimes_linux(cpu, states, ARRAYLEN(states));