1682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck#!/bin/bash 2682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck 3682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# Copyright (C) 2015 The Android Open Source Project 4682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 5682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# Licensed under the Apache License, Version 2.0 (the "License"); 6682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# you may not use this file except in compliance with the License. 7682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# You may obtain a copy of the License at 8682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 9682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# http://www.apache.org/licenses/LICENSE-2.0 10682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 11682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# Unless required by applicable law or agreed to in writing, software 12682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# distributed under the License is distributed on an "AS IS" BASIS, 13682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# See the License for the specific language governing permissions and 15682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# limitations under the License. 16682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck 17682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb root 18682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb wait-for-device 19682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell stop mpdecision 20682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell stop perfd 21682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell stop 22682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckfor pid in $( adb shell ps | awk '{ if ( $9 == "surfaceflinger" ) { print $2 } }' ); do 23682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck adb shell kill $pid 24682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckdone 25682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell setprop debug.egl.traceGpuCompletion 1 26682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell daemonize surfaceflinger 27682573c84b7c21dc8ce4a2375da3961147442c4aJohn Recksleep 3 28682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell setprop service.bootanim.exit 1 29682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck 30682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# cpu possible frequencies 31682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 204000 229500 255000 280500 306000 331500 357000 382500 408000 433500 459000 32682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 484500 510000 535500 561000 586500 612000 637500 663000 688500 714000 739500 33682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 765000 790500 816000 841500 867000 892500 918000 943500 969000 994500 1020000 34682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 1122000 1224000 1326000 1428000 1530000 1632000 1734000 1836000 1938000 35682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 2014500 2091000 2193000 2295000 2397000 2499000 36682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck 37682573c84b7c21dc8ce4a2375da3961147442c4aJohn ReckS=1326000 38682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckecho "set cpu $cpu to $S hz"; 39682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell "echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor" 40682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell "echo $S > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq" 41682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell "echo $S > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq" 42682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell "echo $S > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed" 43682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck 44682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck#disable hotplug 45682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell "echo 0 > /sys/devices/system/cpu/cpuquiet/tegra_cpuquiet/enable" 46682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck 47682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# gbus possible rates 48682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 72000 108000 180000 252000 324000 396000 468000 540000 612000 648000 49682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck# 684000 708000 756000 804000 852000 (kHz) 50682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reck 51682573c84b7c21dc8ce4a2375da3961147442c4aJohn ReckS=324000000 52dfc07dedf79550ce8f481c7931a8763d927d8c50Chris Craikecho "set gpu to $S hz" 53682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell "echo 1 > /d/clock/override.gbus/state" 54682573c84b7c21dc8ce4a2375da3961147442c4aJohn Reckadb shell "echo $S > /d/clock/override.gbus/rate" 55