upload android base code part6
This commit is contained in:
parent
421e214c7d
commit
4e516ec6ed
35396 changed files with 9188716 additions and 0 deletions
46
android/platform_testing/scripts/perf-setup/Android.mk
Normal file
46
android/platform_testing/scripts/perf-setup/Android.mk
Normal file
|
@ -0,0 +1,46 @@
|
|||
#
|
||||
# Copyright (C) 2016 The Android Open Source Project
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
|
||||
# Rules to generate setup script for device perf tests
|
||||
# Different devices may share the same script. To add a new script, define a
|
||||
# new variable named <device name>_script, pointing at the script in current
|
||||
# source folder.
|
||||
# At execution time, scripts will be pushed onto device and run with root
|
||||
# identity
|
||||
|
||||
LOCAL_PATH:= $(call my-dir)
|
||||
|
||||
# only define the target if a perf setup script is defined by the BoardConfig
|
||||
# of the device we are building.
|
||||
#
|
||||
# To add a new script:
|
||||
# 1. add a new setup script suitable for the device at:
|
||||
# platform_testing/scripts/perf-setup/
|
||||
# 2. modify BoardConfig.mk of the corresponding device under:
|
||||
# device/<OEM name>/<device name/
|
||||
# 3. add variable "BOARD_PERFSETUP_SCRIPT", and point it at the path to the new
|
||||
# perf setup script; the path should be relative to the build root
|
||||
ifneq ($(strip $(BOARD_PERFSETUP_SCRIPT)),)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := perf-setup.sh
|
||||
LOCAL_MODULE_CLASS := EXECUTABLES
|
||||
LOCAL_MODULE_TAGS := optional
|
||||
LOCAL_MODULE_PATH := $(TARGET_OUT_DATA)/local/tmp
|
||||
LOCAL_PREBUILT_MODULE_FILE := $(BOARD_PERFSETUP_SCRIPT)
|
||||
include $(BUILD_PREBUILT)
|
||||
|
||||
endif
|
39
android/platform_testing/scripts/perf-setup/angler-setup.sh
Executable file
39
android/platform_testing/scripts/perf-setup/angler-setup.sh
Executable file
|
@ -0,0 +1,39 @@
|
|||
if [[ "`id -u`" -ne "0" ]]; then
|
||||
echo "WARNING: running as non-root, proceeding anyways..."
|
||||
fi
|
||||
|
||||
stop thermal-engine
|
||||
stop perfd
|
||||
|
||||
cpubase=/sys/devices/system/cpu
|
||||
gov=cpufreq/scaling_governor
|
||||
|
||||
cpu=0
|
||||
S=960000
|
||||
while [ $((cpu < 4)) -eq 1 ]; do
|
||||
echo 1 > $cpubase/cpu${cpu}/online
|
||||
echo userspace > $cpubase/cpu${cpu}/$gov
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_setspeed
|
||||
cpu=$(($cpu + 1))
|
||||
done
|
||||
|
||||
echo -n 0 > /sys/devices/system/cpu/cpu4/online
|
||||
echo -n 0 > /sys/devices/system/cpu/cpu5/online
|
||||
echo -n 0 > /sys/devices/system/cpu/cpu6/online
|
||||
echo -n 0 > /sys/devices/system/cpu/cpu7/online
|
||||
|
||||
echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split
|
||||
echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on
|
||||
echo 10000 > /sys/class/kgsl/kgsl-3d0/idle_timer
|
||||
|
||||
echo 11863 > /sys/class/devfreq/qcom,gpubw.70/min_freq
|
||||
|
||||
echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
|
||||
echo 305000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
|
||||
echo 305000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
|
||||
|
||||
echo 4 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
|
||||
echo 4 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
|
||||
|
|
@ -0,0 +1,36 @@
|
|||
if [[ "`id -u`" -ne "0" ]]; then
|
||||
echo "WARNING: running as non-root, proceeding anyways..."
|
||||
fi
|
||||
|
||||
stop thermal-engine
|
||||
stop perfd
|
||||
|
||||
cpubase=/sys/devices/system/cpu
|
||||
gov=cpufreq/scaling_governor
|
||||
|
||||
cpu=0
|
||||
S=960000
|
||||
while [ $((cpu < 4)) -eq 1 ]; do
|
||||
echo 1 > $cpubase/cpu${cpu}/online
|
||||
echo userspace > $cpubase/cpu${cpu}/$gov
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_setspeed
|
||||
cpu=$(($cpu + 1))
|
||||
done
|
||||
|
||||
echo -n 0 > /sys/devices/system/cpu/cpu4/online
|
||||
echo -n 0 > /sys/devices/system/cpu/cpu5/online
|
||||
|
||||
echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split
|
||||
echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on
|
||||
echo 10000 > /sys/class/kgsl/kgsl-3d0/idle_timer
|
||||
|
||||
echo 7102 > /sys/class/devfreq/qcom,gpubw.19/min_freq
|
||||
|
||||
echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
|
||||
echo 300000000 > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq
|
||||
echo 300000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
|
||||
|
||||
echo 4 > /sys/class/kgsl/kgsl-3d0/min_pwrlevel
|
||||
echo 4 > /sys/class/kgsl/kgsl-3d0/max_pwrlevel
|
22
android/platform_testing/scripts/perf-setup/dragon-setup.sh
Executable file
22
android/platform_testing/scripts/perf-setup/dragon-setup.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
# performance testing setup script for dragon device
|
||||
|
||||
if [[ "`id -u`" -ne "0" ]]; then
|
||||
echo "WARNING: running as non-root, proceeding anyways..."
|
||||
fi
|
||||
|
||||
# locking CPU frequency
|
||||
|
||||
# note: locking cpu0 is sufficent to cover other cores as well
|
||||
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
|
||||
echo 1530000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
|
||||
echo 1530000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
|
||||
echo 1530000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
|
||||
|
||||
# locking GPU frequency
|
||||
|
||||
# note: frequency choices can be found in:
|
||||
# cat /sys/class/drm/card0/device/pstate
|
||||
|
||||
# select 768 MHz
|
||||
# 0a: core 768 MHz emc 1600 MHz
|
||||
echo 0a > /sys/class/drm/card0/device/pstate
|
18
android/platform_testing/scripts/perf-setup/sailin-setup.sh
Normal file
18
android/platform_testing/scripts/perf-setup/sailin-setup.sh
Normal file
|
@ -0,0 +1,18 @@
|
|||
#Setup for newer devices
|
||||
|
||||
if [[ "`id -u`" -ne "0" ]]; then
|
||||
echo "WARNING: running as non-root, proceeding anyways..."
|
||||
fi
|
||||
|
||||
stop thermal-engine
|
||||
stop perfd
|
||||
|
||||
echo 0 > /sys/devices/system/cpu/cpu0/online
|
||||
echo 0 > /sys/devices/system/cpu/cpu1/online
|
||||
|
||||
echo performance > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
|
||||
echo 2150400 > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
|
||||
|
||||
echo 13763 > /sys/class/devfreq/soc:qcom,gpubw/max_freq
|
||||
echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor
|
||||
echo -n 624000000 > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq
|
57
android/platform_testing/scripts/perf-setup/wahoo-setup.sh
Normal file
57
android/platform_testing/scripts/perf-setup/wahoo-setup.sh
Normal file
|
@ -0,0 +1,57 @@
|
|||
#Setup for 2017 devices
|
||||
|
||||
stop thermal-engine
|
||||
stop mpdecision
|
||||
stop perfd
|
||||
|
||||
cpubase=/sys/devices/system/cpu
|
||||
gov=cpufreq/scaling_governor
|
||||
|
||||
cpu=4
|
||||
top=8
|
||||
|
||||
# Enable the gold cores at max frequency.
|
||||
# 1248000 1344000 1478400 1555200 1900800 2457600
|
||||
S=2457600
|
||||
|
||||
while [ $((cpu < $top)) -eq 1 ]; do
|
||||
echo "setting cpu $cpu to $S kHz"
|
||||
echo 1 > $cpubase/cpu${cpu}/online
|
||||
echo userspace > $cpubase/cpu${cpu}/$gov
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_max_freq
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_min_freq
|
||||
echo $S > $cpubase/cpu${cpu}/cpufreq/scaling_setspeed
|
||||
cat $cpubase/cpu${cpu}/cpufreq/scaling_cur_freq
|
||||
cpu=$(($cpu + 1))
|
||||
done
|
||||
|
||||
cpu=0
|
||||
top=4
|
||||
|
||||
# Disable the silver cores.
|
||||
while [ $((cpu < $top)) -eq 1 ]; do
|
||||
echo "disable cpu $cpu"
|
||||
echo 0 > $cpubase/cpu${cpu}/online
|
||||
cpu=$(($cpu + 1))
|
||||
done
|
||||
|
||||
echo "setting GPU bus split";
|
||||
echo 0 > /sys/class/kgsl/kgsl-3d0/bus_split;
|
||||
echo "setting GPU force clocks";
|
||||
echo 1 > /sys/class/kgsl/kgsl-3d0/force_clk_on;
|
||||
echo "setting GPU idle timer";
|
||||
echo 10000 > /sys/class/kgsl/kgsl-3d0/idle_timer;
|
||||
|
||||
#0 762 1144 1525 2288 3509 4173 5271 5928 7904 9887 11863 13763
|
||||
echo "setting GPU bus frequency";
|
||||
echo 13763 > /sys/class/devfreq/soc:qcom,gpubw/min_freq;
|
||||
cat /sys/class/devfreq/soc:qcom,gpubw/cur_freq;
|
||||
|
||||
# 710000000 600000000 510000000 450000000 390000000 305000000 180000000
|
||||
echo "GPU performance mode";
|
||||
G=710000000
|
||||
echo performance > /sys/class/kgsl/kgsl-3d0/devfreq/governor;
|
||||
echo $G > /sys/class/kgsl/kgsl-3d0/devfreq/min_freq;
|
||||
echo $G > /sys/class/kgsl/kgsl-3d0/devfreq/max_freq;
|
||||
|
||||
cat /sys/class/kgsl/kgsl-3d0/devfreq/cur_freq;
|
Loading…
Add table
Add a link
Reference in a new issue