mb/starlabs/*: Tweak the performance profiles
Adjust these so they simply adjust the Intel detaults, rather than having hardcoded values. Change-Id: I8375428e9ace8e505e8cb53b2e4912592715b79a Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/85694 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
aacfa3abc6
commit
7bb5849f16
9 changed files with 99 additions and 68 deletions
|
|
@ -23,18 +23,24 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_4core->tdp_pl4 = 36;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
performance_scale -= 50;
|
||||
common_config->pch_thermal_trip = 30;
|
||||
break;
|
||||
case PP_BALANCED:
|
||||
/* Use the Intel defaults */
|
||||
performance_scale -= 25;
|
||||
common_config->pch_thermal_trip = 25;
|
||||
break;
|
||||
case PP_PERFORMANCE:
|
||||
performance_scale += 25;
|
||||
/* Use the Intel defaults */
|
||||
common_config->pch_thermal_trip = 20;
|
||||
break;
|
||||
}
|
||||
|
|
@ -42,9 +48,6 @@ void devtree_update(void)
|
|||
soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_4core->tdp_pl2_override = (soc_conf_4core->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_4core->tdp_pl4 = 36;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0) {
|
||||
cfg->usb2_ports[9].enable = 0;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,13 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf->tdp_pl4 = 31;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf->tdp_pl1_override = (soc_conf->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
|
|
@ -46,9 +52,6 @@ void devtree_update(void)
|
|||
soc_conf->tdp_pl1_override = (soc_conf->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf->tdp_pl2_override = (soc_conf->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf->tdp_pl4 = 31;
|
||||
|
||||
/* Enable/Disable Wireless based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0)
|
||||
nic_dev->enabled = 0;
|
||||
|
|
|
|||
|
|
@ -24,32 +24,36 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_10core->tdp_pl4 = 65;
|
||||
soc_conf_12core->tdp_pl4 = 65;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf_10core->tdp_pl1_override = (soc_conf_10core->tdp_pl2_override / 2) & ~1;
|
||||
soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
performance_scale -= 50;
|
||||
common_config->pch_thermal_trip = 20;
|
||||
break;
|
||||
case PP_BALANCED:
|
||||
/* Use the Intel defaults */
|
||||
performance_scale -= 25;
|
||||
common_config->pch_thermal_trip = 15;
|
||||
break;
|
||||
case PP_PERFORMANCE:
|
||||
performance_scale += 25;
|
||||
/* Use the Intel defaults */
|
||||
common_config->pch_thermal_trip = 10;
|
||||
break;
|
||||
}
|
||||
|
||||
soc_conf_10core->tdp_pl1_override = (soc_conf_10core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl2_override * performance_scale) / 100;
|
||||
soc_conf_10core->tdp_pl2_override = (soc_conf_10core->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
soc_conf_10core->tdp_pl2_override = (soc_conf_10core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_12core->tdp_pl2_override = (soc_conf_12core->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_10core->tdp_pl4 = 65;
|
||||
soc_conf_12core->tdp_pl4 = 65;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0)
|
||||
cfg->usb2_ports[9].enable = 0;
|
||||
|
|
|
|||
|
|
@ -19,18 +19,24 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf->tdp_pl4 = 45;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf->tdp_pl1_override = (soc_conf->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
performance_scale -= 50;
|
||||
cfg->tcc_offset = 20;
|
||||
break;
|
||||
case PP_BALANCED:
|
||||
/* Use the Intel defaults */
|
||||
performance_scale -= 25;
|
||||
cfg->tcc_offset = 15;
|
||||
break;
|
||||
case PP_PERFORMANCE:
|
||||
performance_scale += 25;
|
||||
/* Use the Intel defaults */
|
||||
cfg->tcc_offset = 10;
|
||||
break;
|
||||
}
|
||||
|
|
@ -38,9 +44,6 @@ void devtree_update(void)
|
|||
soc_conf->tdp_pl1_override = (soc_conf->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf->tdp_pl2_override = (soc_conf->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf->tdp_pl4 = 45;
|
||||
|
||||
/* Enable/Disable Wireless based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0)
|
||||
nic_dev->enabled = 0;
|
||||
|
|
|
|||
|
|
@ -19,18 +19,24 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf->tdp_pl4 = 45;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf->tdp_pl1_override = (soc_conf->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
performance_scale -= 50;
|
||||
cfg->tcc_offset = 20;
|
||||
break;
|
||||
case PP_BALANCED:
|
||||
/* Use the Intel defaults */
|
||||
performance_scale -= 25;
|
||||
cfg->tcc_offset = 15;
|
||||
break;
|
||||
case PP_PERFORMANCE:
|
||||
performance_scale += 25;
|
||||
/* Use the Intel defaults */
|
||||
cfg->tcc_offset = 10;
|
||||
break;
|
||||
}
|
||||
|
|
@ -38,9 +44,6 @@ void devtree_update(void)
|
|||
soc_conf->tdp_pl1_override = (soc_conf->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf->tdp_pl2_override = (soc_conf->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf->tdp_pl4 = 45;
|
||||
|
||||
/* Enable/Disable Wireless based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0)
|
||||
nic_dev->enabled = 0;
|
||||
|
|
|
|||
|
|
@ -27,18 +27,26 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_6core->tdp_pl4 = 65;
|
||||
soc_conf_12core->tdp_pl4 = 65;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf_6core->tdp_pl1_override = (soc_conf_6core->tdp_pl2_override / 2) & ~1;
|
||||
soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
performance_scale -= 50;
|
||||
common_config->pch_thermal_trip = 30;
|
||||
break;
|
||||
case PP_BALANCED:
|
||||
/* Use the Intel defaults */
|
||||
performance_scale -= 25;
|
||||
common_config->pch_thermal_trip = 25;
|
||||
break;
|
||||
case PP_PERFORMANCE:
|
||||
performance_scale += 25;
|
||||
/* Use the Intel defaults */
|
||||
common_config->pch_thermal_trip = 20;
|
||||
break;
|
||||
}
|
||||
|
|
@ -49,10 +57,6 @@ void devtree_update(void)
|
|||
soc_conf_12core->tdp_pl1_override = (soc_conf_12core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_12core->tdp_pl2_override = (soc_conf_12core->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_6core->tdp_pl4 = 65;
|
||||
soc_conf_12core->tdp_pl4 = 65;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0)
|
||||
cfg->usb2_ports[9].enable = 0;
|
||||
|
|
|
|||
|
|
@ -25,32 +25,36 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_2core->tdp_pl4 = 65;
|
||||
soc_conf_4core->tdp_pl4 = 65;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf_2core->tdp_pl1_override = (soc_conf_2core->tdp_pl2_override / 2) & ~1;
|
||||
soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
performance_scale -= 50;
|
||||
cfg->tcc_offset = 30;
|
||||
break;
|
||||
case PP_BALANCED:
|
||||
/* Use the Intel defaults */
|
||||
performance_scale -= 25;
|
||||
cfg->tcc_offset = 25;
|
||||
break;
|
||||
case PP_PERFORMANCE:
|
||||
performance_scale += 25;
|
||||
/* Use the Intel defaults */
|
||||
cfg->tcc_offset = 20;
|
||||
break;
|
||||
}
|
||||
|
||||
soc_conf_2core->tdp_pl1_override = (soc_conf_2core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl2_override * performance_scale) / 100;
|
||||
soc_conf_2core->tdp_pl2_override = (soc_conf_2core->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
soc_conf_2core->tdp_pl2_override = (soc_conf_2core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_4core->tdp_pl2_override = (soc_conf_4core->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_2core->tdp_pl4 = 65;
|
||||
soc_conf_4core->tdp_pl4 = 65;
|
||||
|
||||
/* Enable/Disable Wireless based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0)
|
||||
nic_dev->enabled = 0;
|
||||
|
|
|
|||
|
|
@ -28,18 +28,26 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_6core->tdp_pl4 = 65;
|
||||
soc_conf_14core->tdp_pl4 = 65;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf_6core->tdp_pl1_override = (soc_conf_6core->tdp_pl2_override / 2) & ~1;
|
||||
soc_conf_14core->tdp_pl1_override = (soc_conf_14core->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
performance_scale -= 50;
|
||||
common_config->pch_thermal_trip = 30;
|
||||
break;
|
||||
case PP_BALANCED:
|
||||
/* Use the Intel defaults */
|
||||
performance_scale -= 25;
|
||||
common_config->pch_thermal_trip = 25;
|
||||
break;
|
||||
case PP_PERFORMANCE:
|
||||
performance_scale += 25;
|
||||
/* Use the Intel defaults */
|
||||
common_config->pch_thermal_trip = 20;
|
||||
break;
|
||||
}
|
||||
|
|
@ -50,10 +58,6 @@ void devtree_update(void)
|
|||
soc_conf_14core->tdp_pl1_override = (soc_conf_14core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_14core->tdp_pl2_override = (soc_conf_14core->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_6core->tdp_pl4 = 65;
|
||||
soc_conf_14core->tdp_pl4 = 65;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0)
|
||||
cfg->usb2_ports[9].enable = 0;
|
||||
|
|
|
|||
|
|
@ -25,18 +25,24 @@ void devtree_update(void)
|
|||
|
||||
uint8_t performance_scale = 100;
|
||||
|
||||
/* Update PL1 & PL2 based on CMOS settings */
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_4core->tdp_pl4 = 37;
|
||||
|
||||
/* Set PL1 to 50% of PL2 */
|
||||
soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl2_override / 2) & ~1;
|
||||
|
||||
/* Scale PL1 & PL2 based on CMOS settings */
|
||||
switch (get_power_profile(PP_POWER_SAVER)) {
|
||||
case PP_POWER_SAVER:
|
||||
performance_scale -= 25;
|
||||
performance_scale -= 50;
|
||||
common_config->pch_thermal_trip = 30;
|
||||
break;
|
||||
case PP_BALANCED:
|
||||
/* Use the Intel defaults */
|
||||
performance_scale -= 25;
|
||||
common_config->pch_thermal_trip = 25;
|
||||
break;
|
||||
case PP_PERFORMANCE:
|
||||
performance_scale += 25;
|
||||
/* Use the Intel defaults */
|
||||
common_config->pch_thermal_trip = 20;
|
||||
break;
|
||||
}
|
||||
|
|
@ -44,9 +50,6 @@ void devtree_update(void)
|
|||
soc_conf_4core->tdp_pl1_override = (soc_conf_4core->tdp_pl1_override * performance_scale) / 100;
|
||||
soc_conf_4core->tdp_pl2_override = (soc_conf_4core->tdp_pl2_override * performance_scale) / 100;
|
||||
|
||||
/* Set PL4 to 1.0C */
|
||||
soc_conf_4core->tdp_pl4 = 37;
|
||||
|
||||
/* Enable/Disable Bluetooth based on CMOS settings */
|
||||
if (get_uint_option("wireless", 1) == 0) {
|
||||
cfg->usb2_ports[9].enable = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue