prep_buller.sh revision 65d978b407f668cd65a37c78e36819593332a0f5
1#buller is bullhead & angler (☞゚ヮ゚)☞ 2 3nr=$(adb shell cat /proc/cpuinfo | grep processor | wc -l) 4cpubase=/sys/devices/system/cpu 5gov=cpufreq/scaling_governor 6 7adb root 8adb wait-for-device 9adb shell stop thermal-engine 10adb shell stop perfd 11 12# LITTLE cores 13# 384000 460800 600000 672000 787200 864000 960000 1248000 1440000 14# BIG cores 15# 384000 480000 633600 768000 864000 960000 1248000 1344000 1440000 16# 1536000 1632000 1689600 1824000 17 18cpu=0 19S=960000 20while [ $((cpu < 4)) -eq 1 ]; do 21 echo "Setting cpu $cpu to $S hz" 22 adb shell "echo 1 > $cpubase/cpu${cpu}/online" 23 adb shell "echo userspace > $cpubase/cpu${cpu}/$gov" 24 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq" 25 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq" 26 adb shell "echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_setspeed" 27 cpu=$(($cpu + 1)) 28done 29 30while [ $((cpu < $nr)) -eq 1 ]; do 31 echo "disable cpu $cpu" 32 adb shell "echo 0 > $cpubase/cpu${cpu}/online" 33 cpu=$(($cpu + 1)) 34done 35 36echo "setting GPU bus and idle timer" 37adb shell "echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split" 38adb shell "echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on" 39adb shell "echo 10000 > /sys/class/kgsl/kgsl-3d0/idle_timer" 40 41#0 762 1144 1525 2288 3509 4173 5271 5928 7904 9887 11863 42adb shell "echo 11863 > /sys/class/devfreq/qcom,gpubw.70/min_freq" &> /dev/null 43adb shell "echo 11863 > /sys/class/devfreq/qcom,gpubw.19/min_freq" &> /dev/null 44 45#600000000 510000000 450000000 390000000 305000000 180000000 46echo "performance mode, 305 MHz" 47adb shell "echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor" 48adb shell "echo 305000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq" 49adb shell "echo 305000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq" 50