diff options
-rw-r--r-- | util/temp_metrics.conf | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/util/temp_metrics.conf b/util/temp_metrics.conf index 56b64b2e08..d9c3b4f063 100644 --- a/util/temp_metrics.conf +++ b/util/temp_metrics.conf @@ -142,9 +142,21 @@ script done } - set_gpu_freq() { - gpu_freq=$1 - echo $gpu_freq > /sys/kernel/debug/dri/0/i915_max_freq + set_gpu_min_freq() { + GPU_MIN_FREQ=350 + if lsusb -d 1410:9010; then + # Set min GPU freq to 450 to reduce intereference with modem. + GPU_MIN_FREQ=450 + fi + echo $GPU_MIN_FREQ > /sys/kernel/debug/dri/0/i915_min_freq + } + + set_gpu_max_freq() { + gpu_max_freq=$1 + if [ $GPU_MIN_FREQ -gt $gpu_max_freq ]; then + gpu_max_freq=$GPU_MIN_FREQ + fi + echo $gpu_max_freq > /sys/kernel/debug/dri/0/i915_max_freq } set_duty_cycle() { @@ -240,7 +252,7 @@ script pkg_power_limit=$(get_field $PKG_POWER_LIMIT_FIELD "$step") set_cpu_freq $cpu_max_freq $cpu_min_freq - set_gpu_freq $gpu_max_freq + set_gpu_max_freq $gpu_max_freq set_duty_cycle $cpu_duty_cycle set_pkg_power_limit $pkg_power_limit } @@ -332,6 +344,9 @@ script # Set sensor calibration data. set_calibration_data + # Set minimum GPU frequency. + set_gpu_min_freq + loop_count=0 ec_fan_loop=0 |