Sean Rhodes has submitted this change. ( https://review.coreboot.org/c/coreboot/+/85694?usp=email )
Change subject: mb/starlabs/*: Tweak the performance profiles ......................................................................
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 --- M src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c M src/mainboard/starlabs/lite/devtree.c M src/mainboard/starlabs/starbook/variants/adl/devtree.c M src/mainboard/starlabs/starbook/variants/cml/devtree.c M src/mainboard/starlabs/starbook/variants/kbl/devtree.c M src/mainboard/starlabs/starbook/variants/rpl/devtree.c M src/mainboard/starlabs/starbook/variants/tgl/devtree.c M src/mainboard/starlabs/starfighter/variants/rpl/devtree.c M src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c 9 files changed, 99 insertions(+), 68 deletions(-)
Approvals: build bot (Jenkins): Verified Matt DeVillier: Looks good to me, approved
diff --git a/src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c b/src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c index ae87d6a..88e8f3a 100644 --- a/src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c +++ b/src/mainboard/starlabs/byte_adl/variants/mk_ii/devtree.c @@ -23,18 +23,24 @@
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 @@ 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; diff --git a/src/mainboard/starlabs/lite/devtree.c b/src/mainboard/starlabs/lite/devtree.c index 2e192e3..f25628b 100644 --- a/src/mainboard/starlabs/lite/devtree.c +++ b/src/mainboard/starlabs/lite/devtree.c @@ -27,7 +27,13 @@
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 @@ 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; diff --git a/src/mainboard/starlabs/starbook/variants/adl/devtree.c b/src/mainboard/starlabs/starbook/variants/adl/devtree.c index e7fc786..b83f6ad 100644 --- a/src/mainboard/starlabs/starbook/variants/adl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/adl/devtree.c @@ -24,32 +24,36 @@
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; diff --git a/src/mainboard/starlabs/starbook/variants/cml/devtree.c b/src/mainboard/starlabs/starbook/variants/cml/devtree.c index 1496754..b28c9f6 100644 --- a/src/mainboard/starlabs/starbook/variants/cml/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/cml/devtree.c @@ -19,18 +19,24 @@
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 @@ 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; diff --git a/src/mainboard/starlabs/starbook/variants/kbl/devtree.c b/src/mainboard/starlabs/starbook/variants/kbl/devtree.c index a5b13b8..2599db8 100644 --- a/src/mainboard/starlabs/starbook/variants/kbl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/kbl/devtree.c @@ -19,18 +19,24 @@
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 @@ 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; diff --git a/src/mainboard/starlabs/starbook/variants/rpl/devtree.c b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c index 5eea89f..279f4cf 100644 --- a/src/mainboard/starlabs/starbook/variants/rpl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/rpl/devtree.c @@ -27,18 +27,26 @@
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 @@ 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; diff --git a/src/mainboard/starlabs/starbook/variants/tgl/devtree.c b/src/mainboard/starlabs/starbook/variants/tgl/devtree.c index b6422f5..6df6900 100644 --- a/src/mainboard/starlabs/starbook/variants/tgl/devtree.c +++ b/src/mainboard/starlabs/starbook/variants/tgl/devtree.c @@ -25,32 +25,36 @@
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; diff --git a/src/mainboard/starlabs/starfighter/variants/rpl/devtree.c b/src/mainboard/starlabs/starfighter/variants/rpl/devtree.c index 9d4bb69..d4abe940 100644 --- a/src/mainboard/starlabs/starfighter/variants/rpl/devtree.c +++ b/src/mainboard/starlabs/starfighter/variants/rpl/devtree.c @@ -28,18 +28,26 @@
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 @@ 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; diff --git a/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c b/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c index 6067a46..dca182c 100644 --- a/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c +++ b/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c @@ -25,18 +25,24 @@
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 @@ 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;