1*dd0948b3SAndroid Build Coastguard Worker#!/system/bin/sh 2*dd0948b3SAndroid Build Coastguard Worker# 3*dd0948b3SAndroid Build Coastguard Worker# Copyright (C) 2022 The Android Open Source Project 4*dd0948b3SAndroid Build Coastguard Worker# 5*dd0948b3SAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); 6*dd0948b3SAndroid Build Coastguard Worker# you may not use this file except in compliance with the License. 7*dd0948b3SAndroid Build Coastguard Worker# You may obtain a copy of the License at 8*dd0948b3SAndroid Build Coastguard Worker# 9*dd0948b3SAndroid Build Coastguard Worker# http://www.apache.org/licenses/LICENSE-2.0 10*dd0948b3SAndroid Build Coastguard Worker# 11*dd0948b3SAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software 12*dd0948b3SAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, 13*dd0948b3SAndroid Build Coastguard Worker# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14*dd0948b3SAndroid Build Coastguard Worker# See the License for the specific language governing permissions and 15*dd0948b3SAndroid Build Coastguard Worker# limitations under the License. 16*dd0948b3SAndroid Build Coastguard Worker 17*dd0948b3SAndroid Build Coastguard Worker# Performance test setup for 2022 devices 18*dd0948b3SAndroid Build Coastguard Worker 19*dd0948b3SAndroid Build Coastguard Workerecho "Disabling Tskin thermal mitigation..." 20*dd0948b3SAndroid Build Coastguard Workersetprop persist.vendor.disable.thermal.control 1 21*dd0948b3SAndroid Build Coastguard Worker 22*dd0948b3SAndroid Build Coastguard Workerecho "Disabling TJ thermal mitigation..." 23*dd0948b3SAndroid Build Coastguard Workersetprop persist.vendor.disable.thermal.tj.control 1 24*dd0948b3SAndroid Build Coastguard Worker 25*dd0948b3SAndroid Build Coastguard Workerecho "Clearing cooling device states..." 26*dd0948b3SAndroid Build Coastguard Workerfor i in /sys/devices/virtual/thermal/cooling_device*/user_vote; do echo 0 > "$i" 2>/dev/null; done 27*dd0948b3SAndroid Build Coastguard Workerfor i in /sys/devices/virtual/thermal/cooling_device*/cur_state; do echo 0 > "$i" 2>/dev/null; done 28*dd0948b3SAndroid Build Coastguard Worker 29*dd0948b3SAndroid Build Coastguard Workerecho "Disabling powerhints..." 30*dd0948b3SAndroid Build Coastguard Workersetprop vendor.powerhal.init 0 31*dd0948b3SAndroid Build Coastguard Workersetprop ctl.restart vendor.power-hal-aidl 32*dd0948b3SAndroid Build Coastguard Worker 33*dd0948b3SAndroid Build Coastguard Workerecho "Locking LITTLE CPUs to the max freq..." 34*dd0948b3SAndroid Build Coastguard Workerecho 1803000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 35*dd0948b3SAndroid Build Coastguard Workerecho 1803000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 36*dd0948b3SAndroid Build Coastguard Workercat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq 37*dd0948b3SAndroid Build Coastguard Worker 38*dd0948b3SAndroid Build Coastguard Workerecho "Locking MID CPUs to the max freq..." 39*dd0948b3SAndroid Build Coastguard Workerecho 2348000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_max_freq 40*dd0948b3SAndroid Build Coastguard Workerecho 2348000 > /sys/devices/system/cpu/cpu4/cpufreq/scaling_min_freq 41*dd0948b3SAndroid Build Coastguard Workercat /sys/devices/system/cpu/cpu4/cpufreq/scaling_cur_freq 42*dd0948b3SAndroid Build Coastguard Worker 43*dd0948b3SAndroid Build Coastguard Workerecho "Locking BIG CPUs to the max freq..." 44*dd0948b3SAndroid Build Coastguard Workerecho 2850000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_max_freq 45*dd0948b3SAndroid Build Coastguard Workerecho 2850000 > /sys/devices/system/cpu/cpu6/cpufreq/scaling_min_freq 46*dd0948b3SAndroid Build Coastguard Workercat /sys/devices/system/cpu/cpu6/cpufreq/scaling_cur_freq 47*dd0948b3SAndroid Build Coastguard Worker 48*dd0948b3SAndroid Build Coastguard Workerecho "Locking GPU to the max freq..." 49*dd0948b3SAndroid Build Coastguard Workerecho 848000 > /sys/devices/platform/28000000.mali/scaling_max_freq 50*dd0948b3SAndroid Build Coastguard Workerecho 848000 > /sys/devices/platform/28000000.mali/scaling_min_freq 51*dd0948b3SAndroid Build Coastguard Workercat /sys/devices/platform/28000000.mali/cur_freq 52*dd0948b3SAndroid Build Coastguard Worker 53*dd0948b3SAndroid Build Coastguard Workerecho "Locking MIF to the max freq..." 54*dd0948b3SAndroid Build Coastguard Workerecho 3172000 > /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/debug_scaling_devfreq_max 55*dd0948b3SAndroid Build Coastguard Workerecho 3172000 > /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/exynos_data/debug_scaling_devfreq_min 56*dd0948b3SAndroid Build Coastguard Workercat /sys/devices/platform/17000010.devfreq_mif/devfreq/17000010.devfreq_mif/cur_freq 57*dd0948b3SAndroid Build Coastguard Worker 58*dd0948b3SAndroid Build Coastguard Workerecho "Locking INT to the max freq..." 59*dd0948b3SAndroid Build Coastguard Workerecho 533000 > /sys/devices/platform/17000020.devfreq_int/devfreq/17000020.devfreq_int/exynos_data/debug_scaling_devfreq_max 60*dd0948b3SAndroid Build Coastguard Workerecho 533000 > /sys/devices/platform/17000020.devfreq_int/devfreq/17000020.devfreq_int/exynos_data/debug_scaling_devfreq_min 61*dd0948b3SAndroid Build Coastguard Workercat /sys/devices/platform/17000020.devfreq_int/devfreq/17000020.devfreq_int/cur_freq 62*dd0948b3SAndroid Build Coastguard Worker 63*dd0948b3SAndroid Build Coastguard Worker 64