[RFC PATCH v1 0/1] platform/x86: panasonic-laptop: add platform_profile support
Alex Yeo <[email protected]> Thu, 6 Aug 2026 02:05:42 +0800
| Newsgroups | org.kernel.vger.platform-driver-x86,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
This RFC patch 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. I have tested the following models: - CF-RZ6 (2016) - CF-SV8 (2019) - CF-QV9 (2020) - CF-SR4 (2024) State to platform_profile mapping: Profile | Fan Mode | TDP +--------------------------------+-----------+------------+ PLATFORM_PROFILE_COOL (SR4 only)| 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. Proposed mappings in this patch are defined in the quirks struct. Activation of platform_profile is gated by DMI checks. For every model except the SR4, only balanced and performance profiles are defined. This is because the aggressive fan paired with the locked TDP on the SR4 more appropriately correspond to the cool profile. Test results for the proposed 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 Thank you, Alex Alex Yeo (1): platform/x86: panasonic-laptop: add platform_profile support drivers/platform/x86/panasonic-laptop.c | 380 ++++++++++++++++++++++++ 1 file changed, 380 insertions(+) -- 2.55.0