diff options
author | Richard Yeh <rcy@google.com> | 2022-11-28 04:08:24 +0000 |
---|---|---|
committer | Chromeos LUCI <chromeos-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-01-31 04:00:20 +0000 |
commit | 41497123d484b33620f4adc9387f65722797b0f0 (patch) | |
tree | 35112f6342b30cc0d157f8d7cf44baee0e65fb2c /board/genesis/board.c | |
parent | da770c44e6481758085af8d17efe731622a92c66 (diff) | |
download | chrome-ec-firmware-puff-13324.B-master.tar.gz |
{ambassador,genesis,moonbuggy,scout}: Increase fan to reduce throttling.firmware-puff-13324.B-master
Chromebox for Meetings (CfM) devices are videoconferencing appliances.
Discovering that a significant fraction of our fleet was throttling the
CPU due to temperature, resulting in bad video quality, we have decided
that these devices should never throttle. The present change reduces the
temperature thresholds at which we increase fan speeds. For most of the
time, when the CfM is idle, we expect no or little change in fan speeds.
During calls, the CfM CPU can exceed 60 C, and the sensors controlling
the fan are typically 10-20 degrees C cooler than the CPU, so we set
the maximum-fan temperature to 50-55 C in an attempt to arrest any
temperature increase before the CPU reaches throttling temperatures.
We add fan tables to enable hysteresis in the fan speed setting. Fan
RPMs are chosen to span the min-to-max range, while avoiding 50 Hz and
60 Hz line frequencies.
fizz and kalista boards are shared with non-CfM versions, while the
other boards are CfM-only. Since those boards are several years old, we
plan to build these firmware changes only into CfM-branch releases, not
all fizz and kalista devices.
Additional details at go/cfm-overheating . Temperature traces with load
testing on both top-of-tree and firmware with this change are shown at
go/cfm-overheating#heading=h.ykpzxotgnu2j
BRANCH=update-fan-tables
BUG=b:252966838,b:191187610,chromium:1383859
TEST=Confirmed validity of settings with `ectool thermalset`. Built
firmware, flashed to endeavour and excelsior (fizz), verified that fan
turns on earlier. This does not completely prevent throttling from
47.25 W to 15.00 W on Kaby Lake boards (endeavour, fizz, kalista), but
it does prevent dropping below 15.00 W. Comet Lake boards (ambassador,
genesis, moonbuggy, scout) start at 15.00 W and rarely throttle anyway.
Signed-off-by: Richard Yeh <rcy@google.com>
Change-Id: I7f23583ca1b85d3b8b9da43918880f68b41538c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060610
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
(cherry picked from commit 5e2e4a52a1b2d5231285a7ff5081f291b8adad1a)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4200717
Reviewed-by: Kyle Williams <kdgwill@chromium.org>
Diffstat (limited to 'board/genesis/board.c')
-rw-r--r-- | board/genesis/board.c | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/board/genesis/board.c b/board/genesis/board.c index 22bed97fe7..7c56544390 100644 --- a/board/genesis/board.c +++ b/board/genesis/board.c @@ -228,6 +228,8 @@ BUILD_ASSERT(ARRAY_SIZE(mft_channels) == MFT_CH_COUNT); /******************************************************************************/ /* Thermal control; drive fan based on temperature sensors. */ +static const int temp_fan_off = C_TO_K(35); +static const int temp_fan_max = C_TO_K(55); const static struct ec_thermal_config thermal_a = { .temp_host = { [EC_TEMP_THRESH_WARN] = 0, @@ -239,8 +241,8 @@ const static struct ec_thermal_config thermal_a = { [EC_TEMP_THRESH_HIGH] = C_TO_K(70), [EC_TEMP_THRESH_HALT] = 0, }, - .temp_fan_off = C_TO_K(25), - .temp_fan_max = C_TO_K(84), + .temp_fan_off = temp_fan_off, + .temp_fan_max = temp_fan_max, }; struct ec_thermal_config thermal_params[] = { @@ -248,6 +250,39 @@ struct ec_thermal_config thermal_params[] = { }; BUILD_ASSERT(ARRAY_SIZE(thermal_params) == TEMP_SENSOR_COUNT); +static const struct fan_step_1_1 fan_table0[] = { + { .decreasing_temp_ratio_threshold = TEMP_TO_RATIO(35), + .increasing_temp_ratio_threshold = TEMP_TO_RATIO(41), + .rpm = 2500 }, + { .decreasing_temp_ratio_threshold = TEMP_TO_RATIO(40), + .increasing_temp_ratio_threshold = TEMP_TO_RATIO(44), + .rpm = 2900 }, + { .decreasing_temp_ratio_threshold = TEMP_TO_RATIO(42), + .increasing_temp_ratio_threshold = TEMP_TO_RATIO(46), + .rpm = 3400 }, + { .decreasing_temp_ratio_threshold = TEMP_TO_RATIO(44), + .increasing_temp_ratio_threshold = TEMP_TO_RATIO(48), + .rpm = 3900 }, + { .decreasing_temp_ratio_threshold = TEMP_TO_RATIO(46), + .increasing_temp_ratio_threshold = TEMP_TO_RATIO(50), + .rpm = 4400 }, + { .decreasing_temp_ratio_threshold = TEMP_TO_RATIO(48), + .increasing_temp_ratio_threshold = TEMP_TO_RATIO(52), + .rpm = 4900 }, + { .decreasing_temp_ratio_threshold = TEMP_TO_RATIO(50), + .increasing_temp_ratio_threshold = TEMP_TO_RATIO(55), + .rpm = 5200 }, +}; +#define NUM_FAN_LEVELS ARRAY_SIZE(fan_table0) + +static const struct fan_step_1_1 *fan_table = fan_table0; + +int fan_percent_to_rpm(int fan_index, int temp_ratio) +{ + return temp_ratio_to_rpm_hysteresis(fan_table, NUM_FAN_LEVELS, + fan_index, temp_ratio, NULL); +} + /* Power sensors */ const struct ina3221_t ina3221[] = { { I2C_PORT_INA, 0x40, { "PP3300_G", "PP5000_A", "PP3300_WLAN" } }, |