mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 21:56:42 +00:00
amlogic: fix cpufreq for SoCs with multiple cpu clusters
This commit is contained in:
parent
51eb1849ee
commit
7c6983624e
@ -4,15 +4,21 @@
|
|||||||
# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)
|
# Copyright (C) 2009-2015 Stephan Raue (stephan@openelec.tv)
|
||||||
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
# Copyright (C) 2019-present Team LibreELEC (https://libreelec.tv)
|
||||||
|
|
||||||
SYS_CPUFREQ_GOV=$( cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor )
|
SYS_CPUFREQ_GOV=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
|
||||||
SYS_ONDEMAND_DIR="/sys/devices/system/cpu/cpufreq/ondemand/"
|
|
||||||
|
|
||||||
# Configure frequency scaling properties
|
|
||||||
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
if [ "${SYS_CPUFREQ_GOV}" = "ondemand" ]; then
|
||||||
echo 1 > "${SYS_ONDEMAND_DIR}/io_is_busy"
|
for io_is_busy in $(find /sys/devices/system/cpu -name io_is_busy); do
|
||||||
echo 50 > "${SYS_ONDEMAND_DIR}/up_threshold"
|
echo 1 > "${io_is_busy}"
|
||||||
echo 100000 > "${SYS_ONDEMAND_DIR}/sampling_rate"
|
done
|
||||||
echo 50 > "${SYS_ONDEMAND_DIR}/sampling_down_factor"
|
for up_threshold in $(find /sys/devices/system/cpu -name up_threshold); do
|
||||||
|
echo 50 > "${up_threshold}"
|
||||||
|
done
|
||||||
|
for sampling_rate in $(find /sys/devices/system/cpu -name sampling_rate); do
|
||||||
|
echo 100000 > "${sampling_rate}"
|
||||||
|
done
|
||||||
|
for sampling_down_factor in $(find /sys/devices/system/cpu -name sampling_down_factor); do
|
||||||
|
echo 50 > "${sampling_down_factor}"
|
||||||
|
done
|
||||||
else
|
else
|
||||||
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
echo "cpufreq: settings not found for current cpu governor." | systemd-cat -p info
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user