summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSameer Nanda <snanda@chromium.org>2012-11-28 11:10:36 -0800
committerGerrit <chrome-bot@google.com>2012-11-28 13:06:59 -0800
commit8722b5b142bb2dcbd7e0aa14c867eb17b9aeb850 (patch)
treeeeef0fdb6ac49009866cd03c8f8f40eed553262d
parentd619cdd58f473efe7b8c67e817080fc16751b4a5 (diff)
downloadchrome-ec-8722b5b142bb2dcbd7e0aa14c867eb17b9aeb850.tar.gz
temp_metrics: Set GPU min freq
On systems with modems, a harmonic of the lowest GPU frequency of 350Mhz interferes with the cellular signal. Set the minimum GPU frequency for such systems to 450Mhz. BUG=chrome-os-partner:16439 TEST="cat /sys/kernel/debug/dri/0/i915_min_freq". On systems without this modem, it should read back 350. On systems with the modem, it should read back 450. BRANCH=none Change-Id: I103a55af11955aed2f3e8c945904444475c63865 Signed-off-by: Sameer Nanda <snanda@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/38826 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Todd Broch <tbroch@chromium.org>
-rw-r--r--util/temp_metrics.conf23
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