From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f41.google.com (mail-pj1-f41.google.com [209.85.216.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D12C30B529 for ; Wed, 5 Aug 2026 18:06:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.41 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785953177; cv=none; b=BpBV+Au42yGydWCVEW+tJQjo1QMEosaIVPkUEx110LgHHXlUOe+f14CBIvjBJ1gVJPFb/gwPS89p31XAICrRmqLZjFsS450G/pY+tYRYVARWdhHCCCga5y7RJchgFFWk3Xvot+OTRtxe+KdSSY3L2N8Bys73EhJzN23n1qyZqF8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785953177; c=relaxed/simple; bh=aPGxXx6p6cZSwx4Rfq9MqTesKIQ9jY39WOTaHzs3+M0=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=qSTCft72gZswp9hZvY44/QQkzjkLysGIgKJQNrPz1mhd7rOqzqeu1aegORs9h6Yk90De/lF8M9h3iD4JtEf5JeHY+QG/yhHGxYqnyVTXOYFJrkLvlBawFB5J8HSFWGwwSi0witQmrS/R4bE8i0632wIq+qaiMON1zHtpF4kkJH0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=G/rEUhn3; arc=none smtp.client-ip=209.85.216.41 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="G/rEUhn3" Received: by mail-pj1-f41.google.com with SMTP id 98e67ed59e1d1-38e041ea211so1514169a91.0 for ; Wed, 05 Aug 2026 11:06:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785953176; x=1786557976; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=GK6vID6V8XbOUhrwHEAz5Ca1KT6fvP6lvb078p4aWHs=; b=G/rEUhn3EkekdcuclnayuAJ273Ajc2uOplnRAXiI3XSQ7VgVahttIJE+on5Go3Tjs/ gZrVpbClks3x5YlYi+z48FeypqJ8smLBuGeCoepn1JX6Yzs7gSWj+D+vaxaCp9lOK5Y/ /9SOWKX9lZD1NPn0nb7tu3LfdNf/6X2drN4gIkst1cqGKOeFVZFuknv55g/ABe6CnUxF jtNTj24pqRcKJPKdjdFNHlpJ68c+dKPs4U2TDvnbokCPFaGz9ftE4Ybq3B/s2WCTqiCs 0PQB0pD43evaODZNWDd4h43pkm0Fz1hCJjCYo0cH9DkZmGU69o3YqfjoFOMU2h2FwrUO 0LsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785953176; x=1786557976; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=GK6vID6V8XbOUhrwHEAz5Ca1KT6fvP6lvb078p4aWHs=; b=eziteCSig5qtNfeGaU/sSaujqTQNewkhqE7jn8SYLXer3hnT7lLLtSzqBcTEB/iLsO 5vCW84pQE00WtfmTmWqbUp8rsd1MnZOB0BYVnwbUVp+NgoZbMMZ2JxWBsldwei75JX4v IPUnRzMhfhF4SQUQaw5l6jC0YNI7KoRYm7jQUHOGVwWzftG0k0iAU0LlMDt1MFXTGq8d PJLd3sIk+kKnLH23YZWLwlEvyWODy0gmRQnpXM3kLwDh+NxLqCJWgKjXAg9DPSEg/z1L aIFx4vsHhGqOzIvZvE/+GbIJvc9ejx/AmCcae28g4OpiK4yzNqyGWmdgRXOkYz9Qrk4u HwAw== X-Forwarded-Encrypted: i=1; AHgh+Ro4MQD4uGkNCmFZgNcENOrjBqzaYv29Yg1tJAXtx/PAq98DRhERC1xqSMIKqKxAhoInBzAv7wAAh5aF+A8=@vger.kernel.org X-Gm-Message-State: AOJu0Yx38obQDKFC4Q32EvADpxyDjwq6kJIxzUcyAsYVoflJcCNzM/br 7b5Uc0NUc5UMcZQ/auuKBkXADU03ABDtcsO7ApvgdUrWGLJxjGhYQIbD X-Gm-Gg: AR+sD13AAxML4rCz4RroyPqHA2aa6ucqN9hzSS+2PV6c5KgSq5UANhQMhrTW9kAXeXf nEvKzEFgZJsE/UlVrgdQ/2xGhr6x6J547eIbPA70vl8eDfBuNALi/sUsQt8wUBxCJT5VgCaMk1E A1Bh7Km9vHLU3WQQwYG8OCSz/hr/dyNezZfOfj9fEoBEKwcu5kjVpC+uL2DYc5qcOZn2uV1ImT8 H+dx5l9UXOfI+BJziCTNA2us4HCJMl5q4did/uEuJYhMzk9lwo98ZlNLrSS5hF9lSFR8A4q/oQ6 okzx94dCSqWetIKHWLNQoDkt1Pvn15q/1j5zdIfHNDdPbUESBRcQEZqjQOFF2R3dESkPovGIKsM qDWMxuX1N26UNBTtxnTcfJUxdDoRkTYUIZBLWDGzienoh7qpT0yMDjyv5LeopwWmQTGw3RJDaCT 9RLrvJ5+gq6iJKism4ZYAnQG/9koxtEJ3WckNyiw1dQ20U5ISNoawSyyOYO2CppojR4RdJCZVGy 2HxI5hn76Mw3nY3+9dX X-Received: by 2002:a17:90b:3806:b0:38e:7080:b4c0 with SMTP id 98e67ed59e1d1-3903c5cfbccmr8014619a91.10.1785953175724; Wed, 05 Aug 2026 11:06:15 -0700 (PDT) Received: from localhost ([112.204.123.220]) by smtp.googlemail.com with ESMTPSA id 98e67ed59e1d1-3903f5d9b91sm2178422a91.3.2026.08.05.11.06.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Aug 2026 11:06:14 -0700 (PDT) From: Alex Yeo To: platform-driver-x86@vger.kernel.org Cc: alexyeo362@gmail.com, Kenneth Chan , Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , linux-kernel@vger.kernel.org Subject: [RFC PATCH v1 0/1] platform/x86: panasonic-laptop: add platform_profile support Date: Thu, 6 Aug 2026 02:05:42 +0800 Message-ID: <20260805180544.1134916-1-alexyeo362@gmail.com> X-Mailer: git-send-email 2.55.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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