linux-IllusionX/drivers/thermal/intel
Stanislaw Gruszka b33f3d2677 thermal: intel: hfi: Enable HFI only when required
Enable and disable hardware feedback interface (HFI) when user space
handler is present. For example, enable HFI, when intel-speed-select or
Intel Low Power daemon is running and subscribing to thermal netlink
events. When user space handlers exit or remove subscription for
thermal netlink events, disable HFI.

Summary of changes:

 - Register a thermal genetlink notifier

 - In the notifier, process THERMAL_NOTIFY_BIND and THERMAL_NOTIFY_UNBIND
   reason codes to count number of thermal event group netlink multicast
   clients. If thermal netlink group has any listener enable HFI on all
   packages. If there are no listener disable HFI on all packages.

- When CPU is online, instead of blindly enabling HFI, check if
  the thermal netlink group has any listener. This will make sure that
  HFI is not enabled by default during boot time.

- Actual processing to enable/disable matches what is done in
  suspend/resume callbacks. Create two functions hfi_enable_instance()
  and hfi_disable_instance(), which can be called from the netlink
  notifier callback and suspend/resume callbacks.

Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2024-03-27 14:50:26 +01:00
..
int340x_thermal Thermal control updates for 6.9-rc1 2024-03-13 12:03:57 -07:00
intel_bxt_pmic_thermal.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
intel_hfi.c thermal: intel: hfi: Enable HFI only when required 2024-03-27 14:50:26 +01:00
intel_hfi.h thermal: intel: hfi: Enable notification interrupt 2022-02-03 19:50:49 +01:00
intel_pch_thermal.c thermal: core: Eliminate writable trip points masks 2024-02-27 12:04:38 +01:00
intel_powerclamp.c x86/cpu/topology: Rename topology_max_die_per_package() 2024-02-15 22:07:45 +01:00
intel_quark_dts_thermal.c thermal: core: Eliminate writable trip points masks 2024-02-27 12:04:38 +01:00
intel_soc_dts_iosf.c thermal: core: Eliminate writable trip points masks 2024-02-27 12:04:38 +01:00
intel_soc_dts_iosf.h thermal: intel: Set THERMAL_TRIP_FLAG_RW_TEMP directly 2024-02-27 12:04:01 +01:00
intel_soc_dts_thermal.c thermal: intel: intel_soc_dts_iosf: Rework critical trip setup 2023-08-11 18:44:45 +02:00
intel_tcc.c thermal/intel: Fix intel_tcc_get_temp() to support negative CPU temperature 2024-02-12 18:41:38 +01:00
intel_tcc_cooling.c x86/cpu: Fix Gracemont uarch 2023-08-09 21:51:06 +02:00
Kconfig thermal: Get rid of CONFIG_THERMAL_WRITABLE_TRIPS 2024-02-23 18:24:48 +01:00
Makefile thermal: intel: menlow: Get rid of this driver 2023-04-27 19:24:13 +02:00
therm_throt.c thermal: intel: Avoid updating unsupported THERM_STATUS_CLEAR mask bits 2023-04-11 18:12:19 +02:00
thermal_interrupt.h thermal: intel: Protect clearing of thermal status bits 2022-11-23 20:09:06 +01:00
x86_pkg_temp_thermal.c Thermal control updates for 6.9-rc1 2024-03-13 12:03:57 -07:00