Skip to contentSkip to conversation

Add RAPL/DPTF support for Pantherlake

PATCH In review Zhang Rui 2 participants 5 messages Dec 3, 2024 – Dec 10, 2024

Subsystems (3)
lore
Share & tools
lore

Zhang Rui

author reviewer
#0 lore raw

cover Add RAPL/DPTF support for Pantherlake

There is an effort on going to avoid per CPU model ID enabling for RAPL support. But this takes some time and requires sufficient test to make sure no regression introduced. So enable PantherLake RAPL support before any rework.

Zhang Rui (3):
powercap: intel_rapl: Add support for PantherLake platform
thermal: intel: int340x: processor: Enable MMIO RAPL for PantherLake
ACPI: DPTF: Support Panther Lake

 drivers/acpi/dptf/dptf_pch_fivr.c                           | 1 +
 drivers/acpi/dptf/dptf_power.c                              | 2 ++
 drivers/acpi/dptf/int340x_thermal.c                         | 6 ++++++
 drivers/acpi/fan.h                                          | 1 +
 drivers/powercap/intel_rapl_common.c                        | 1 +
 drivers/thermal/intel/int340x_thermal/int3400_thermal.c     | 1 +
 drivers/thermal/intel/int340x_thermal/int3403_thermal.c     | 1 +
 .../intel/int340x_thermal/processor_thermal_device.h        | 1 +
 .../intel/int340x_thermal/processor_thermal_device_pci.c    | 1 +
 9 files changed, 15 insertions(+)
Signature · 1 line
2.43.0
author reviewer
#1 lore raw

PATCH 1/3 powercap: intel_rapl: Add support for PantherLake platform

Add support for PantherLake platform to the RAPL common driver.

---
 drivers/powercap/intel_rapl_common.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/intel_rapl_common.c +1 -0
index 5e793b80fd6b..77d75e1f14a9 100644
@@ -1265,6 +1265,7 @@ static const struct x86_cpu_id rapl_ids[] __initconst = {
 	X86_MATCH_VFM(INTEL_SAPPHIRERAPIDS_X,	&rapl_defaults_spr_server),
 	X86_MATCH_VFM(INTEL_EMERALDRAPIDS_X,	&rapl_defaults_spr_server),
 	X86_MATCH_VFM(INTEL_LUNARLAKE_M,	&rapl_defaults_core),
+	X86_MATCH_VFM(INTEL_PANTHERLAKE_L,	&rapl_defaults_core),
 	X86_MATCH_VFM(INTEL_ARROWLAKE_H,	&rapl_defaults_core),
 	X86_MATCH_VFM(INTEL_ARROWLAKE,		&rapl_defaults_core),
 	X86_MATCH_VFM(INTEL_ARROWLAKE_U,	&rapl_defaults_core),
Signature · 1 line
2.43.0
author reviewer
#2 lore raw

PATCH 2/3 thermal: intel: int340x: processor: Enable MMIO RAPL for PantherLake

In reply to Zhang Rui

Enable MMIO RAPL support for PantherLake platform.

---
 drivers/thermal/intel/int340x_thermal/processor_thermal_device.h | 1 +
 .../thermal/intel/int340x_thermal/processor_thermal_device_pci.c | 1 +
 2 files changed, 2 insertions(+)
drivers/thermal/intel/int340x_thermal/processor_thermal_device.h +1 -0
index d5eca6db2c00..ba2d89d3024c 100644
@@ -30,6 +30,7 @@
 #define PCI_DEVICE_ID_INTEL_RPL_THERMAL	0xA71D
 #define PCI_DEVICE_ID_INTEL_SKL_THERMAL	0x1903
 #define PCI_DEVICE_ID_INTEL_TGL_THERMAL	0x9A03
+#define PCI_DEVICE_ID_INTEL_PTL_THERMAL	0xB01D
 
 struct power_config {
 	u32	index;
drivers/thermal/intel/int340x_thermal/processor_thermal_device_pci.c +1 -0
index ba5d36d36fc4..a8eb4b20f26c 100644
@@ -495,6 +495,7 @@ static const struct pci_device_id proc_thermal_pci_ids[] = {
 	  PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_DLVR | PROC_THERMAL_FEATURE_WT_HINT) },
 	{ PCI_DEVICE_DATA(INTEL, RPL_THERMAL, PROC_THERMAL_FEATURE_RAPL |
 	  PROC_THERMAL_FEATURE_FIVR | PROC_THERMAL_FEATURE_DVFS | PROC_THERMAL_FEATURE_WT_REQ) },
+	{ PCI_DEVICE_DATA(INTEL, PTL_THERMAL, PROC_THERMAL_FEATURE_RAPL) },
 	{ },
 };
 
Signature · 1 line
2.43.0
author reviewer
#3 lore raw

PATCH 3/3 ACPI: DPTF: Support Panther Lake

In reply to Zhang Rui

Add Panther Lake ACPI IDs for DPTF devices.

---
 drivers/acpi/dptf/dptf_pch_fivr.c                       | 1 +
 drivers/acpi/dptf/dptf_power.c                          | 2 ++
 drivers/acpi/dptf/int340x_thermal.c                     | 6 ++++++
 drivers/acpi/fan.h                                      | 1 +
 drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 1 +
 drivers/thermal/intel/int340x_thermal/int3403_thermal.c | 1 +
 6 files changed, 12 insertions(+)
drivers/acpi/dptf/dptf_pch_fivr.c +1 -0
index 624fce67ce43..952216c67d58 100644
@@ -152,6 +152,7 @@ static const struct acpi_device_id pch_fivr_device_ids[] = {
 	{"INTC1064", 0},
 	{"INTC106B", 0},
 	{"INTC10A3", 0},
+	{"INTC10D7", 0},
 	{"", 0},
 };
 MODULE_DEVICE_TABLE(acpi, pch_fivr_device_ids);
drivers/acpi/dptf/dptf_power.c +2 -0
index 3d3edd81b172..e8caf4106ff9 100644
@@ -236,6 +236,8 @@ static const struct acpi_device_id int3407_device_ids[] = {
 	{"INTC106D", 0},
 	{"INTC10A4", 0},
 	{"INTC10A5", 0},
+	{"INTC10D8", 0},
+	{"INTC10D9", 0},
 	{"", 0},
 };
 MODULE_DEVICE_TABLE(acpi, int3407_device_ids);
drivers/acpi/dptf/int340x_thermal.c +6 -0
index 014ada759954..aef7aca2161d 100644
@@ -55,6 +55,12 @@ static const struct acpi_device_id int340x_thermal_device_ids[] = {
 	{"INTC10A3"},
 	{"INTC10A4"},
 	{"INTC10A5"},
+	{"INTC10D4"},
+	{"INTC10D5"},
+	{"INTC10D6"},
+	{"INTC10D7"},
+	{"INTC10D8"},
+	{"INTC10D9"},
 	{""},
 };
 
drivers/acpi/fan.h +1 -0
index db25a3898af7..488b51e2cb31 100644
@@ -19,6 +19,7 @@
 	{"INTC1063", }, /* Fan for Meteor Lake generation */ \
 	{"INTC106A", }, /* Fan for Lunar Lake generation */ \
 	{"INTC10A2", }, /* Fan for Raptor Lake generation */ \
+	{"INTC10D6", }, /* Fan for Panther Lake generation */ \
 	{"PNP0C0B", } /* Generic ACPI fan */
 
 #define ACPI_FPS_NAME_LEN	20
drivers/thermal/intel/int340x_thermal/int3400_thermal.c +1 -0
index 8660ef2175be..5805e08d71be 100644
@@ -690,6 +690,7 @@ static const struct acpi_device_id int3400_thermal_match[] = {
 	{"INTC1042", 0},
 	{"INTC1068", 0},
 	{"INTC10A0", 0},
+	{"INTC10D4", 0},
 	{}
 };
 
drivers/thermal/intel/int340x_thermal/int3403_thermal.c +1 -0
index 04aa0afb3b1d..5a925a8df7b3 100644
@@ -275,6 +275,7 @@ static const struct acpi_device_id int3403_device_ids[] = {
 	{"INTC1062", 0},
 	{"INTC1069", 0},
 	{"INTC10A1", 0},
+	{"INTC10D5", 0},
 	{"", 0},
 };
 MODULE_DEVICE_TABLE(acpi, int3403_device_ids);
Signature · 1 line
2.43.0
#4 lore raw
In reply to Zhang Rui
Quoted 22 lines · Zhang Rui

There is an effort on going to avoid per CPU model ID enabling for RAPL support. But this takes some time and requires sufficient test to make sure no regression introduced. So enable PantherLake RAPL support before any rework.

Zhang Rui (3):
powercap: intel_rapl: Add support for PantherLake platform
thermal: intel: int340x: processor: Enable MMIO RAPL for PantherLake
ACPI: DPTF: Support Panther Lake

 drivers/acpi/dptf/dptf_pch_fivr.c                           | 1 +
 drivers/acpi/dptf/dptf_power.c                              | 2 ++
 drivers/acpi/dptf/int340x_thermal.c                         | 6 ++++++
 drivers/acpi/fan.h                                          | 1 +
 drivers/powercap/intel_rapl_common.c                        | 1 +
 drivers/thermal/intel/int340x_thermal/int3400_thermal.c     | 1 +
 drivers/thermal/intel/int340x_thermal/int3403_thermal.c     | 1 +
 .../intel/int340x_thermal/processor_thermal_device.h        | 1 +
 .../intel/int340x_thermal/processor_thermal_device_pci.c    | 1 +
 9 files changed, 15 insertions(+)
Quoted 1 line

--

All applied as 6.14 material, thanks!