1# performance testing setup script for dragon device 2 3if [[ "`id -u`" -ne "0" ]]; then 4 echo "WARNING: running as non-root, proceeding anyways..." 5fi 6 7# locking CPU frequency 8 9# note: locking cpu0 is sufficent to cover other cores as well 10echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor 11echo 1530000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 12echo 1530000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 13echo 1530000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 14 15# locking GPU frequency 16 17# note: frequency choices can be found in: 18# cat /sys/class/drm/card0/device/pstate 19 20# select 768 MHz 21# 0a: core 768 MHz emc 1600 MHz 22echo 0a > /sys/class/drm/card0/device/pstate 23