diff options
author | Wei Miao <miaowei@google.com> | 2022-04-12 16:14:38 -0700 |
---|---|---|
committer | John Scheible <johnscheible@google.com> | 2022-04-21 18:16:27 -0700 |
commit | a96a198c9328b06866df39ebd420b0f3fd58ce51 (patch) | |
tree | f0b337e15a1d7fbbcdd98156b1ebd6d9ed3b12a6 | |
parent | 14814a3c18c7057fe4bea3f0f41bcd7b4af5bda4 (diff) | |
download | gs201-a96a198c9328b06866df39ebd420b0f3fd58ce51.tar.gz |
Cherry-pick fixes for b/22956075 from 'gs201-release'
gxp: Fix thermal driver issue when pass in low val
Bug: 229560757
gxp: Add extra DVFS level for thermal throttling
Bug: 229008441
Signed-off-by: John Scheible <johnscheible@google.com>
Change-Id: Ib007c3c21acd63793f0adbe354f96e17e0534ade
-rw-r--r-- | gxp-thermal.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gxp-thermal.c b/gxp-thermal.c index 71cb67e..d6d867a 100644 --- a/gxp-thermal.c +++ b/gxp-thermal.c @@ -26,19 +26,18 @@ #include "gxp-thermal.h" #include "gxp-lpm.h" -#define MAX_NUM_GXP_STATES 10 -#define OF_DATA_NUM_MAX (MAX_NUM_GXP_STATES * 2) - /* * Value comes from internal measurement - * https://docs.google.com/spreadsheets - * /d/1owRNFlm9EH-7IsycHXBnctyzGAd5j-VyLQOZ1ysFb7c + * b/229623553 */ -static struct gxp_state_pwr state_pwr_map[MAX_NUM_GXP_STATES] = { - {1055000, 180}, - {750000, 72}, - {373000, 21}, - {178000, 10}, +static struct gxp_state_pwr state_pwr_map[] = { + {1155000, 78}, + {975000, 58}, + {750000, 40}, + {560000, 27}, + {373000, 20}, + {268000, 16}, + {178000, 13}, }; static int gxp_get_max_state(struct thermal_cooling_device *cdev, @@ -82,7 +81,9 @@ static int gxp_set_cur_state(struct thermal_cooling_device *cdev, if (cooling_state != thermal->cooling_state) { #ifdef CONFIG_GXP_CLOUDRIPPER ret = exynos_acpm_set_policy(AUR_DVFS_DOMAIN, - pwr_state < AUR_UUD ? AUR_UUD : pwr_state); + pwr_state < aur_power_state2rate[AUR_UUD] ? + aur_power_state2rate[AUR_UUD] : + pwr_state); #endif if (ret) { dev_err(dev, |