Skip to content

Commit

Permalink
power.c: improve debug print
Browse files Browse the repository at this point in the history
Signed-off-by: Michał Kopeć <[email protected]>
  • Loading branch information
mkopec committed Dec 6, 2023
1 parent db2ffbb commit a862f7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/board/system76/common/power.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,15 +369,15 @@ static void power_peci_limit(bool ac) {
ac ? options_get(OPT_ALLOW_BAT_BOOST) ? "AC + DC" : "AC" : "DC"
);

// Set PsysL2 to 2W below supply wattage (Intel says PL3 = PL2 + 2W)
// Set PsysPL2 to 2W below supply wattage (Intel says PL3 = PL2 + 2W)
watts = supply_watts - 2;
res = peci_wr_pkg_config(PECI_REG_PKG_CFG_PSYS_PL2, 0, PECI_PSYS_PL2(watts));
DEBUG(" SET PsysPL2 = %llu %s\n", watts, (res == 0x40) ? "OK" : "ERR");

// Set PsysPL3 (peak short term power) to supply wattage
watts = supply_watts;
res = peci_wr_pkg_config(PECI_REG_PKG_CFG_PL3, 0, PECI_PL3(watts, 6, 4));
DEBUG(" SET PL3 = %llu %s\n", watts, (res == 0x40) ? "OK" : "ERR");
DEBUG(" SET PsysPL3 = %llu %s\n", watts, (res == 0x40) ? "OK" : "ERR");

// Cap PL4 to supply wattage if needed
watts = (supply_watts > POWER_LIMIT_AC) ? POWER_LIMIT_AC : supply_watts;
Expand Down

0 comments on commit a862f7d

Please sign in to comment.