Skip to contentSkip to conversation

platform/x86/intel/pmc Fix Arrow Lake U/H support to intel_pmc_core driver

PATCH Superseded Todd Brandt 2 participants 3 messages May 16, 2025 – May 20, 2025

Subsystems (2)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 platform/x86/intel/pmc Fix Arrow Lake U/H support to intel_pmc_core driver

The ARL requires that the GMA and NPU devices both be in D3Hot in order for PC10 and S0iX to be achieved in S2idle. The original ARL-H/U addition to the intel_pmc_core driver attempted to do this by switching them to D3 in the init and resume calls of the intel_pmc_core driver.

The problem is the ARL-H/U have a different NPU device and thus are not being properly set and thus S0iX does not work properly in ARL-H/U. This patch creates a new ARL-H specific device id that is correct and also adds the D3 fixup to the suspend callback. This way if the PCI devies drop from D3 to D0 after resume they can be corrected for the next suspend. Thus there is no dropout in S0iX.

Fixes bd820906ea9d ("platform/x86/intel/pmc: Add Arrow Lake U/H support to intel_pmc_core driver")
---
 drivers/platform/x86/intel/pmc/arl.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
drivers/platform/x86/intel/pmc/arl.c +10 -2
index 320993bd6d31..5053e3dd8f5e 100644
@@ -681,6 +681,7 @@ static struct pmc_info arl_pmc_info_list[] = {
 
 #define ARL_NPU_PCI_DEV			0xad1d
 #define ARL_GNA_PCI_DEV			0xae4c
+#define ARL_H_NPU_PCI_DEV		0x7d1d
 #define ARL_H_GNA_PCI_DEV		0x774c
 /*
  * Set power state of select devices that do not have drivers to D3
@@ -694,7 +695,7 @@ static void arl_d3_fixup(void)
 
 static void arl_h_d3_fixup(void)
 {
-	pmc_core_set_device_d3(ARL_NPU_PCI_DEV);
+	pmc_core_set_device_d3(ARL_H_NPU_PCI_DEV);
 	pmc_core_set_device_d3(ARL_H_GNA_PCI_DEV);
 }
 
@@ -705,6 +706,13 @@ static int arl_resume(struct pmc_dev *pmcdev)
 	return cnl_resume(pmcdev);
 }
 
+static void arl_h_suspend(struct pmc_dev *pmcdev)
+{
+	arl_h_d3_fixup();
+
+	cnl_suspend(pmcdev);
+}
+
 static int arl_h_resume(struct pmc_dev *pmcdev)
 {
 	arl_h_d3_fixup();
@@ -739,7 +747,7 @@ struct pmc_dev_info arl_h_pmc_dev = {
 	.dmu_guid = ARL_PMT_DMU_GUID,
 	.regmap_list = arl_pmc_info_list,
 	.map = &mtl_socm_reg_map,
-	.suspend = cnl_suspend,
+	.suspend = arl_h_suspend,
 	.resume = arl_h_resume,
 	.init = arl_h_core_init,
 };
Signature · 1 line
2.25.1
maintainer
#1 lore raw
Quoted 5 lines · Todd Brandt

The ARL requires that the GMA and NPU devices both be in D3Hot in order for PC10 and S0iX to be achieved in S2idle. The original ARL-H/U addition to the intel_pmc_core driver attempted to do this by switching them to D3 in the init and resume calls of the intel_pmc_core driver.

Quoted 8 lines

The problem is the ARL-H/U have a different NPU device and thus are not being properly set and thus S0iX does not work properly in ARL-H/U. This patch creates a new ARL-H specific device id that is correct and also adds the D3 fixup to the suspend callback. This way if the PCI devies drop from D3 to D0 after resume they can be corrected for the next suspend. Thus there is no dropout in S0iX.

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my local branch there, which might take a while.

The list of commits applied:
[1/1] platform/x86/intel/pmc Fix Arrow Lake U/H support to intel_pmc_core driver

      commit: 219aadc94ba0bddc1355ce5c5abba7fc96e758a2

--
i.

#2 lore raw
Quoted 21 lines · Ilpo Järvinen
Quoted 19 lines · Todd Brandt

The ARL requires that the GMA and NPU devices both be in D3Hot in order
for PC10 and S0iX to be achieved in S2idle. The original ARL-H/U addition
to the intel_pmc_core driver attempted to do this by switching them to D3
in the init and resume calls of the intel_pmc_core driver.

The problem is the ARL-H/U have a different NPU device and thus are not
being properly set and thus S0iX does not work properly in ARL-H/U. This
patch creates a new ARL-H specific device id that is correct and also
adds the D3 fixup to the suspend callback. This way if the PCI devies
drop from D3 to D0 after resume they can be corrected for the next suspend. Thus there is no dropout in S0iX.

Quoted 8 lines
Quoted 1 line

[...]

Thank you for your contribution, it has been applied to my local review-ilpo-fixes branch. Note it will show up in the public platform-drivers-x86/review-ilpo-fixes branch only once I've pushed my
local branch there, which might take a while.

I've made one simplification that I'm about to push on Xi's suggestion.

Quoted 9 lines

The list of commits applied:
[1/1] platform/x86/intel/pmc Fix Arrow Lake U/H support to intel_pmc_core driver
      commit: 219aadc94ba0bddc1355ce5c5abba7fc96e758a2

--
 i.