]> git.ipfire.org Git - thirdparty/linux.git/commit
thermal: int340x: processor_thermal: Enable slow workload type hints
authorSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Thu, 18 Dec 2025 22:25:58 +0000 (14:25 -0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 7 Jan 2026 20:42:10 +0000 (21:42 +0100)
commita499c24cc0720258376b6c66d7a0c73b47a0e30a
tree46d1bd01953fc4a2e87a6f2e70dbf3416441293c
parent3e0873527c599b5acae9eee1543806752ed254f7
thermal: int340x: processor_thermal: Enable slow workload type hints

On processors starting from Panther Lake, additional workload type hints
are provided.

The hardware analyzes workload residencies over an extended period to
determine whether the workload classification tends toward idle/battery
life states or sustained/performance states. Based on this long-term
analysis, it classifies:

 Power Classification: If the workload exhibits more idle or battery
  life residencies, it is classified as "power". This is indicated by
  setting bit 4 of the current workload type.

 Performance Classification: If the workload exhibits more sustained
  or performance residencies, it is classified as "performance". This
  is indicated by clearing bit 4 of the current workload type.

This approach enables applications to ignore short-term workload
fluctuations and instead respond to longer-term power vs. performance
trends. Hints of this type are called slow workload hints.

To get notifications for slow workload hints, bit 22 in the thermal
mailbox can be used for configuring workload interrupts. It is possible
to exclusively enable slow workload hints or enable them in addition to
the current workload hints.

To enable slow workload hints, a new sysfs attribute is added to the
existing workload hint attributes:

 workload_slow_hint_enable (RW): Write 1 to enable, 0 to disable.

Reading this attribute shows the current state.

This attribute is not present on any previous generation of processors.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
[ rjw: Dropped redundant local variables, changelog edits ]
Link: https://patch.msgid.link/20251218222559.4110027-2-srinivas.pandruvada@linux.intel.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Documentation/driver-api/thermal/intel_dptf.rst
drivers/thermal/intel/int340x_thermal/processor_thermal_wt_hint.c