summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/cpuinfo-linux.h
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 /firmware/target/hosted/cpuinfo-linux.h
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 'firmware/target/hosted/cpuinfo-linux.h')
-rw-r--r--firmware/target/hosted/cpuinfo-linux.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/firmware/target/hosted/cpuinfo-linux.h b/firmware/target/hosted/cpuinfo-linux.h
index ebc05d5c43..0483a3a9aa 100644
--- a/firmware/target/hosted/cpuinfo-linux.h
+++ b/firmware/target/hosted/cpuinfo-linux.h
@@ -40,6 +40,28 @@ struct time_state {
int cpuusage_linux(struct cpuusage* u);
int frequency_linux(int cpu, bool scaling);
+
+#if defined(DX50) || defined(DX90)
+/*
+ Get the current cpufreq scaling governor.
+ cpu [in]: The number of the cpu to query.
+ governor [out]: Buffer for the governor.
+ governor_size [in]: Size of the buffer for the governor.
+ Returns true on success, false else.
+*/
+bool current_scaling_governor(int cpu, char* governor, int governor_size);
+
+
+/*
+ Get the minimum, current or maximum cpufreq scaling frequency.
+ cpu [in]: The number of the cpu to query.
+ Returns -1 failure.
+*/
+int min_scaling_frequency(int cpu);
+int current_scaling_frequency(int cpu);
+int max_scaling_frequency(int cpu);
+#endif
+
int cpustatetimes_linux(int cpu, struct time_state* data, int max_elements);
int cpucount_linux(void);