mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-01 12:52:26 +00:00
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>
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user