[MTK] Commands debug about CPU/GPU/DRAM/FPSGO/Thermal/Display
文摘 Android MediaTek 2020-10-5 阅读:18298[DESCRIPTION]
大家在分析performance问题时,经常需要boost CPU/GPU/DRAM、关闭FPSGO/Thermal、对比Display资讯,本FAQ提供常用的debug命令以供参考。
[SOLUTION]
1. Command - CPU
CPU相关debug指令
adb root
Fix L & LL cores max frequency:
adb shell "echo 0 0 > /proc/ppm/policy/ut_fix_freq_idx"
Fix cluster0 cores max frequency, some chip's L core is cluster0, some chip's L core is cluster1.
adb shell "echo -1 0 > /proc/ppm/policy/ut_fix_freq_idx"
Fix cluster1 cores max frequency
adb shell "echo 0 -1 > /proc/ppm/policy/ut_fix_freq_idx"
Get L & LL cores frequency
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_freq"
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_freq"
Get L & LL cores opp table
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_L/cpufreq_oppidx"
adb shell "cat /proc/cpufreq/MT_CPU_DVFS_LL/cpufreq_oppidx"
Check current eas status
adb shell "cat /sys/devices/system/cpu/eas/info"
关闭cluster0 cores
adb shell "echo 0 4 > /proc/ppm/policy/ut_fix_core_num"
More CPU Commands can refer to FAQ21818.
2. Command - GPU
GPU相关debug指令
adb root
Get frequency table
adb shell "cat /proc/gpufreq/gpufreq_opp_dump"
Fix frequency, the frequency sbould in gpufreq_opp_dump
adb shell "echo *000 > /proc/gpufreq/gpufreq_opp_freq"
Check current frequency:
adb shell "cat /proc/gpufreq/gpufreq_var_dump"
定GPU天花板OPP档位
adb shell "echo 1 > /d/ged/hal/custom_upbound_gpu_freq"
3. Command - DRAM
VCORE相关debug指令
adb root
Force VCORE DVFS
adb shell "echo 0 > /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_force_vcore_dvfs_opp" //0档表示最高频率
Check VCORE current status
adb shell "while true; do (sleep 1; cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_dump | grep -e uv -e khz -e REQ -e DVFSRC_SW_REQ ; echo ===========================); done"
Get OPP table
adb shell "cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_opp_table"
Check if VCORE DVFS is enabled
adb shell "cat /sys/devices/platform/10012000.dvfsrc/helio-dvfsrc/dvfsrc_enable"
More DRAM FAQs can refer to FAQ22607
4. Command - FPSGO
FPSGO开关指令
adb root
Check FPSGO enabled
adb shell "cat /sys/kernel/debug/fpsgo/common/fpsgo_enable"
Disable FPSGO
adb shell "echo 0 > /sys/kernel/debug/fpsgo/common/force_onoff"
Enable FPSGO
adb shell "echo 1 > /sys/kernel/debug/fpsgo/common/force_onoff"
Check target fps
adb shell "cat /sys/kernel/debug/fpsgo/fstb/fpsgo_status"
5. Command - Thermal
Thermal开关指令
adb root
Disable thermal
adb shell "thermal_manager /vendor/etc/.tp/.ht120.mtc"
Enable thermal policy
adb shell "thermal_manager vendor/etc/.tp/thermal.conf"
查看当前thermal policy
adb shell "cat /data/vendor/.tp/.settings"
android O之前的版本,使用的节点是/data/.tp/.settings
adb shell "cat /data/.tp/.settings"
查看当前thermal policy下的threshold
adb shell "cat /proc/driver/thermal/clctm"
Some thermal test of old android version can refer to FAQ15144
6. Display相关指令
检查解析度 & Buffer slots资讯
adb shell "dumpsys SurfaceFlinger" > sf1.log
change window size command
adb shell "wm size 720x1560"
Reset window size command
adb shell wm size reset
More display commands can refer to FAQ22797/FAQ23408/FAQ2255510.jpg