From bd2c2520949aa53ea1323f22be5a3d9d9e05179c Mon Sep 17 00:00:00 2001 From: Sukumar Ghorai Date: Mon, 31 Jul 2023 03:24:44 -0700 Subject: [PATCH] mb/google/{rex,ovis}: Disable C1-state auto demotion for rex & ovis C1-state auto demotion feature allows hardware to determine C1-state as per platform policy. Since platform sets performance policy to balanced from hardware, auto demotion can be disabled without performance impact. Also, disabling this feature results soc to enter PC2 and lower state in camera preview case and save platform power. Note: C1 demotion heuristics used EPB parameter to balance between power and performance, i.e. low threshold when EPB is low in-order to get C1 demotion faster and vice-versa. ChromeOS operates at default EPB=0x7 (low EPB) in both AC/DC, so in DC mode it gets more C1 demotion hits than expected (similar to AC mode) and losing power respectively. BUG=b:286328295 TEST=Code compiles and correct value of c1-state auto demotion is passed to FSP. Also verified PC residency improvement ~10% in camera preview case. Change-Id: I548e0e5340dec537d05718dd2f4652e10fb36ac0 Signed-off-by: Sukumar Ghorai Reviewed-on: https://review.coreboot.org/c/coreboot/+/76827 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Sumeet R Pawnikar Reviewed-by: Sridhar Siricilla Reviewed-by: Kapil Porwal Reviewed-by: Eric Lai --- src/mainboard/google/rex/variants/baseboard/ovis/devicetree.cb | 3 +++ src/mainboard/google/rex/variants/baseboard/rex/devicetree.cb | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/mainboard/google/rex/variants/baseboard/ovis/devicetree.cb b/src/mainboard/google/rex/variants/baseboard/ovis/devicetree.cb index 75fef6d521..6fc0dc029a 100644 --- a/src/mainboard/google/rex/variants/baseboard/ovis/devicetree.cb +++ b/src/mainboard/google/rex/variants/baseboard/ovis/devicetree.cb @@ -33,6 +33,9 @@ chip soc/intel/meteorlake # S0ix enable register "s0ix_enable" = "1" + # Disable C1 C-state auto-demotion + register "disable_c1_state_auto_demotion" = "1" + # Enable Energy Reporting register "pch_pm_energy_report_enable" = "1" diff --git a/src/mainboard/google/rex/variants/baseboard/rex/devicetree.cb b/src/mainboard/google/rex/variants/baseboard/rex/devicetree.cb index 57a5288261..b21c011190 100644 --- a/src/mainboard/google/rex/variants/baseboard/rex/devicetree.cb +++ b/src/mainboard/google/rex/variants/baseboard/rex/devicetree.cb @@ -33,6 +33,9 @@ chip soc/intel/meteorlake # S0ix enable register "s0ix_enable" = "1" + # Disable C1 C-state auto-demotion + register "disable_c1_state_auto_demotion" = "1" + # Enable Energy Reporting register "pch_pm_energy_report_enable" = "1"