Support power limits above 256W

This commit is contained in:
Jeremy Soller
2023-02-15 19:04:04 -07:00
parent 8bd3b49273
commit ff7d7138b0

View File

@ -306,7 +306,7 @@ void power_off(void) {
#ifdef HAVE_DGPU
static bool power_peci_limit(bool ac) {
uint8_t watts = ac ? POWER_LIMIT_AC : POWER_LIMIT_DC;
uint16_t watts = ac ? POWER_LIMIT_AC : POWER_LIMIT_DC;
// Set PL4 using PECI
int16_t res = peci_wr_pkg_config(60, 0, ((uint32_t)watts) * 8);
DEBUG("power_peci_limit %d = %d\n", watts, res);