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