[PATCH v5 0/2] platform/x86: panasonic-laptop: add platform_profile support
From: Alex Yeo
Date: Thu Dec 03 2026 - 04:00:07 EST
Add platform_profile support for Panasonic Let's Note laptops.
Patch 1 maps the firmware fan mode and TDP limit onto
platform_profile for the models tested here. Patch 2, from Wu,
adds the CF-SV1-2 quirk.
Tested on CF-RZ6 (2016), CF-SV8 (2019), CF-QV9 (2020) and
CF-SR4 (2024). CF-SV1-2 was tested by Wu.
This patch series adds support for mapping firmware thermal and CPU power
operating policy to platform_profile for Panasonic Let's Note laptops.
This originally started as a hwmon and thermal patch, but further
analysis had revealed that these are firmware power and thermal
policies as opposed to fan control.
Panasonic firmware exposes firmware operating policy through two
methods:
- Fan cooling policy (active/passive)
- Processor TDP limit (capped/uncapped)
At boot, firmware defaults to an active cooling policy with the
CPU TDP capped. Vendor drivers / DPTF normally unlocks this on
Windows.
These 2 methods map to 4 possible distinct states. Only states that
correspond to the platform_profile ABI are mapped and exposed as
choices. Unmapped states will be returned as "custom" by the driver.
State to platform_profile mapping:
Profile | Fan Mode | TDP
+--------------------------------+-----------+------------+
PLATFORM_PROFILE_COOL (SR4/SV1) | Active | Locked
PLATFORM_PROFILE_BALANCED | Active | Locked
PLATFORM_PROFILE_QUIET | Passive | Locked
PLATFORM_PROFILE_PERFORMANCE | Active | Unlocked
CUSTOM (unmapped on all) | Passive | Unlocked
Across all of them, the fan and TDP modes are toggled by the same ACPI
methods. However, there is a slight variation in its interpretation based
on testing results.
These methods are normally called by the DPTF/IPF _OSC handshake.
Depending on the capability bits, the firmware will alter its thermal
and power policy.
\_SB.IETM Implementation A:
- CF-RZ6 (2016)
- CF-SV8 (2019)
\_SB.IETM Implementation B:
- CF-QV9 (2020)
- CF-SR4 (2024)
Models belonging to the same group share what appears to be identical
AML code for the _OSC.
This patch only exposes the ability to read and set these firmware
toggles. The get() callback queries current firmware state and returns
the mapped platform_profile. The set() callback sets the target state
regardless of current state.
Mappings in this patch are defined in the quirks struct.
Activation of platform_profile is gated by DMI checks.
By default, only balanced and performance profiles are defined.
This is because the aggressive fan paired with the locked TDP
on the SV1 and SR4 more appropriately correspond to the cool profile.
Test results for the mappings are below.
Test results:
================
(CPU PkgWatt: peak / sustained)
(Sysbench CPU: all available threads)
CF-RZ6: (i5-7Y57, Startup default: Balanced)
Platform Profile | CPU PkgWatt | Sysbench CPU | Stress Temp (CPU)
+-----------------+-----------------+----------------+-------------------+
BALANCED | 10.0W / 9.0W | 19712 | 57C
PERFORMANCE | 18.9W / 14.9W | 29132 | 72C
CF-SV8: (i5-8365U, Startup default: Balanced)
Platform Profile | CPU PkgWatt | Sysbench CPU | Stress Temp (CPU)
+-----------------+------------------+----------------+-------------------+
BALANCED | 9.9W / 9.9W | 44695 | 58C
PERFORMANCE | 29.0W / 19.9W | 71747 | 81C
CF-QV9: (i5-10310U, Startup default: Balanced)
Platform Profile | CPU PkgWatt | Sysbench CPU | Stress Temp (CPU)
+-----------------+------------------+----------------+-------------------+
BALANCED | 10.0W / 9.9W | 46545 | 59C
PERFORMANCE | 18.9W / 14.9W | 57416 | 70C
CF-SR4: (i5-1345U, Startup default: Cool)
Platform Profile | CPU PkgWatt | Sysbench CPU | Stress Temp (CPU)
+-----------------+------------------+----------------+-------------------+
COOL | 12.0W / 12.0W | 177139 | 66C
QUIET | 12.0W / 12.0W | 176315 | 73C-75C
PERFORMANCE | 29.6W / 21.3W | 247602 | 98C-100C
CF-SR4 Notes:
- QUIET: downclock/throttle at 75C, no increase in package_throttle_count
- PERFORMANCE: stable boost clock, package_throttle_count increase
Other notes:
===============
Additional notes about thermald:
During testing, I have observed that running thermald for the first time
since boot will trigger an _OSC negotiation that will unlock CPU TDP for
new models (IETM Implementation B). Once thermald is running, exits or
runs again, these bits were not observed to change again during testing.
Running thermald on older models (IETM Implementation A) does not touch
the fan curve or TDP mode setting.
Suspend: observed to not alter the values set prior to suspend
The SV1 (CF-SV1-2) was tested by Wu. More details and data:
https://github.com/numuly/cf-sv1-2-platform-profile-evidence
Alex Yeo (1):
platform/x86: panasonic-laptop: add platform_profile support
Wu Zhipeng (1):
platform/x86: panasonic-laptop: add CF-SV1-2 platform_profile entry
---
v5:
- rewritten as a series
- commit message reformatted
- rebased onto platform-drivers-x86/for-next
- dropped RFC
- CF-SV1-2 added as a separate patch
v4: https://lore.kernel.org/platform-driver-x86/20261025191300.1259541-1-alexyeo362@xxxxxxxxx/
- Consolidated separate quirk structs for the RZ6, QV9 and SV8 into a
quirk_default struct.
v3: https://lore.kernel.org/platform-driver-x86/20261007190446.38862-1-alexyeo362@xxxxxxxxx/
- Removed sysfs.h import
- Refactored platform profile probe function to use a different pattern
(check warn_on, continue on double unset, then set)
v2: https://lore.kernel.org/platform-driver-x86/20261006085021.853827-1-alexyeo362@xxxxxxxxx/
- Refactored code to use its own platform_driver
- Removed DEFINE_FREE and its corresponding __free as its addition
in this module is inappropriate
- Removed pr_fmt line as its addition to this patch is inappropriate
- Added DMI check during __init to prevent attempt of platform profile
device loading on unsupported hardware
- Fixed use of enums as truth values by adding explicit comparisons
- Added *profile_pdev to keep track of new platform_driver
- Removed extra spaces in the quirk definitions
- Added helper function for calling EC methods for simplicity
- Use ARRAY_SIZE() for for loops and added include for array_size.h
- Refactored pcc_profile to be a pointer in platform profile set
function
- Use WARN_ON() when a malformed quirk is detected in the platform
profile probe function
- Avoid use of status as variable name if not acpi_status
- Added Kconfig line for ACPI_PLATFORM_PROFILE
- Removed bool .use_platform_profiles from the quirks struct as it is
no longer needed as a result of the platform_driver being separate.
- Moved DMI quirk matching in probe function before devm_kzalloc of
driver struct
v1: https://lore.kernel.org/platform-driver-x86/20260805180544.1134916-1-alexyeo362@xxxxxxxxx/
drivers/platform/x86/Kconfig | 1 +
drivers/platform/x86/panasonic-laptop.c | 381 +++++++++++++++++++++++-
2 files changed, 381 insertions(+), 1 deletion(-)
--
2.56.1