1#Setup for 2017 devices 2 3stop thermal-engine 4stop perfd 5stop vendor.thermal-engine 6stop vendor.perfd 7setprop vendor.powerhal.init 0 8setprop ctl.interface_restart android.hardware.power@1.0::IPower/default 9 10cpubase=/sys/devices/system/cpu 11gov=cpufreq/scaling_governor 12 13cpu=4 14top=8 15 16# Enable the gold cores at max frequency. 17# 1248000 1344000 1478400 1555200 1900800 2457600 18S=2457600 19 20while [ $((cpu < $top)) -eq 1 ]; do 21 echo "setting cpu $cpu to $S kHz" 22 echo 1 > $cpubase/cpu${cpu}/online 23 echo userspace > $cpubase/cpu${cpu}/$gov 24 echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq 25 echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq 26 echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_setspeed 27 cat $cpubase/cpu${cpu}/cpufreq/scaling_cur_freq 28 cpu=$(($cpu + 1)) 29done 30 31cpu=0 32top=4 33 34# Disable the silver cores. 35while [ $((cpu < $top)) -eq 1 ]; do 36 echo "disable cpu $cpu" 37 echo 0 > $cpubase/cpu${cpu}/online 38 cpu=$(($cpu + 1)) 39done 40 41echo "setting GPU bus split" 42echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split 43echo "setting GPU force clocks" 44echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on 45echo "setting GPU idle timer" 46echo 10000 > /sys/class/kgsl/kgsl-3d0/idle_timer 47 48#0 762 1144 1525 2288 3509 4173 5271 5928 7904 9887 11863 13763 49echo "setting GPU bus frequency" 50echo 13763 > /sys/class/devfreq/soc:qcom,gpubw/min_freq 51cat /sys/class/devfreq/soc:qcom,gpubw/cur_freq 52 53# 710000000 600000000 510000000 450000000 390000000 305000000 180000000 54echo "GPU performance mode" 55G=710000000 56echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor 57echo $G > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq 58echo $G > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq 59 60cat /sys/class/kgsl/kgsl-3d0/devfreq/cur_freq 61