Merge "talos au: update cpu, ddr, l3, gpu frequencies on post boot up."
This commit is contained in:
commit
2eaeb03067
|
@ -72,6 +72,119 @@ function 8937_sched_dcvs_eas()
|
|||
|
||||
}
|
||||
|
||||
function configure_sku_parameters() {
|
||||
|
||||
#read feature id from nvram
|
||||
reg_val=`cat /sys/devices/platform/soc/780130.qfprom/qfprom0/nvmem | od -An -t d4`
|
||||
feature_id=$(((reg_val >> 20) & 0xFF))
|
||||
log -t BOOT -p i "feature id '$feature_id'"
|
||||
if [ $feature_id == 6 ]; then
|
||||
echo " SKU Configured : SA6145"
|
||||
echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
|
||||
echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq
|
||||
echo 1017600000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq
|
||||
echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq
|
||||
echo 1017600000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq
|
||||
echo 3 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
|
||||
echo 3 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
|
||||
echo {class:ddr, res:fixed, val: 1016} > /sys/kernel/debug/aop_send_message
|
||||
setprop vendor.sku_identified 1
|
||||
elif [ $feature_id == 5 ]; then
|
||||
echo "SKU Configured : SA6150"
|
||||
echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
|
||||
echo 998400 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
echo 998400 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
|
||||
echo 998400 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
|
||||
echo 998400 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
|
||||
echo 998400 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
|
||||
echo 998400 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
|
||||
echo 1708800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
|
||||
echo 1708800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
|
||||
echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq
|
||||
echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq
|
||||
echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq
|
||||
echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq
|
||||
echo 2 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
|
||||
echo 2 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
|
||||
echo {class:ddr, res:fixed, val: 1333} > /sys/kernel/debug/aop_send_message
|
||||
setprop vendor.sku_identified 1
|
||||
elif [ $feature_id == 4 || $feature_id == 3 ]; then
|
||||
echo "SKU Configured : SA6155"
|
||||
echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
|
||||
echo 1900800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
|
||||
echo 1900800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
|
||||
echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq
|
||||
echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq
|
||||
echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq
|
||||
echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq
|
||||
echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
|
||||
echo 0 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
|
||||
echo {class:ddr, res:fixed, val: 1555} > /sys/kernel/debug/aop_send_message
|
||||
setprop vendor.sku_identified 1
|
||||
else
|
||||
echo "unknown feature_id value" $feature_id
|
||||
echo 748800 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq
|
||||
echo 748800 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_min_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
|
||||
echo 1017600 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_min_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq
|
||||
echo 1593600 > /sys/devices/system/cpu/cpu5/cpufreq/scaling_max_freq
|
||||
echo 1900800 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq
|
||||
echo 1900800 > /sys/devices/system/cpu/cpu7/cpufreq/scaling_max_freq
|
||||
echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/min_freq
|
||||
echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu0-cpu-l3-lat/max_freq
|
||||
echo 940800000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/min_freq
|
||||
echo 1363200000 > /sys/class/devfreq/soc\:qcom,cpu6-cpu-l3-lat/max_freq
|
||||
echo 0 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
|
||||
echo 0 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
|
||||
echo {class:ddr, res:fixed, val: 1555} > /sys/kernel/debug/aop_send_message
|
||||
setprop vendor.sku_identified 1
|
||||
fi
|
||||
}
|
||||
|
||||
function 8953_sched_dcvs_hmp()
|
||||
{
|
||||
#scheduler settings
|
||||
|
@ -2958,6 +3071,10 @@ case "$target" in
|
|||
case "$soc_id" in
|
||||
"355" | "369" | "377" | "380" | "384" )
|
||||
|
||||
# update frequencies
|
||||
configure_sku_parameters
|
||||
sku_identified=`getprop vendor.sku_identified`
|
||||
|
||||
# Core control parameters on silver
|
||||
echo 0 0 0 0 1 1 > /sys/devices/system/cpu/cpu0/core_ctl/not_preferred
|
||||
echo 4 > /sys/devices/system/cpu/cpu0/core_ctl/min_cpus
|
||||
|
@ -2987,14 +3104,18 @@ case "$target" in
|
|||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/up_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/down_rate_limit_us
|
||||
echo 1209600 > /sys/devices/system/cpu/cpu0/cpufreq/schedutil/hispeed_freq
|
||||
echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
if [ $sku_identified != 1 ]; then
|
||||
echo 576000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
fi
|
||||
|
||||
# configure governor settings for big cluster
|
||||
echo "schedutil" > /sys/devices/system/cpu/cpu6/cpufreq/scaling_governor
|
||||
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/up_rate_limit_us
|
||||
echo 0 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/down_rate_limit_us
|
||||
echo 1209600 > /sys/devices/system/cpu/cpu6/cpufreq/schedutil/hispeed_freq
|
||||
echo 768000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
|
||||
if [ $sku_identified != 1 ]; then
|
||||
echo 768000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq
|
||||
fi
|
||||
|
||||
# sched_load_boost as -6 is equivalent to target load as 85. It is per cpu tunable.
|
||||
echo -6 > /sys/devices/system/cpu/cpu6/sched_load_boost
|
||||
|
|
Loading…
Reference in New Issue