From: Edip Hazuri edip@medip.dev
[ Upstream commit 54afb047cd7eb40149f3fc42d69fd4ddde2be9f0 ]
This patch adds Victus 16-r0 (8bbe) and Victus 16-s0(8bd4, 8bd5) laptop DMI board name into existing list
Signed-off-by: Edip Hazuri edip@medip.dev Link: https://patch.msgid.link/20251015181042.23961-3-edip@medip.dev Reviewed-by: Ilpo Järvinen ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen ilpo.jarvinen@linux.intel.com Signed-off-by: Sasha Levin sashal@kernel.org ---
LLM Generated explanations, may be completely bogus:
### 1. COMMIT MESSAGE ANALYSIS The commit subject "platform/x86: hp-wmi: mark Victus 16-r0 and 16-s0 for victus_s fan and thermal profile support" clearly indicates a hardware enablement patch. - **Problem:** Specific HP Victus laptop models (16-r0 and 16-s0) are not recognized by the `hp-wmi` driver's thermal management logic. - **Solution:** Add their DMI board names to the driver's allowlist. - **Tags:** No "Fixes:" or "Cc: stable" tags are present, which is common for device ID additions, though "Cc: stable" is preferred. - **Type:** Hardware enablement via ID addition.
### 2. DEEP CODE RESEARCH **Code Change:** The patch modifies `drivers/platform/x86/hp/hp-wmi.c` by adding three strings (`"8BBE"`, `"8BD4"`, `"8BD5"`) to the `victus_s_thermal_profile_boards[]` array.
**Mechanism:** 1. **Entry Point:** The driver initializes platform profiles (performance, balanced, quiet modes). 2. **Detection:** The function `is_victus_s_thermal_profile()` (not shown in diff but known from context) checks `dmi_check_system()` or compares the board name against the `victus_s_thermal_profile_boards[]` array. 3. **Behavior:** - **Before:** These laptops return `false`, causing the driver to fall back to generic or legacy thermal handling, or disable thermal profile support entirely. This results in users being unable to control fan speeds or thermal envelopes (e.g., "Performance" mode won't work). - **After:** The board names match, returning `true`. This engages the `victus_s` code path, enabling the correct WMI calls for these specific motherboard revisions.
**Dependencies:** The patch relies on the `victus_s` infrastructure (functions like `platform_profile_victus_s_ops`) being present in the kernel. This infrastructure was introduced recently. Therefore, this backport is valid **only** for stable trees that contain the base `victus_s` support (likely 6.13+ or earlier kernels where the feature itself was backported). For kernels lacking the base feature, this patch is irrelevant. Assuming the target stable tree has the driver infrastructure, this ID addition is correct.
### 3. STABLE KERNEL RULES ASSESSMENT This commit falls squarely under **Exception #1: NEW DEVICE IDs**. - **Rule:** "Adding PCI IDs, USB IDs, ACPI IDs, etc. to existing drivers... These are trivial one-line additions that enable hardware support." - **Analysis:** - **Existing Driver:** The `hp-wmi` driver and the `victus_s` capability already exist in the tree. - **Trivial:** The change is purely data (adding strings to an array). - **No Logic Change:** No executable code logic is altered; only the data set for detection is expanded. - **Hardware Support:** It enables existing, tested driver code to function on new hardware variants.
### 4. RISK VS BENEFIT - **Benefit:** High for affected users. Without this patch, owners of these laptops on stable kernels (e.g., enterprise desktops, LTS distros) have broken thermal management. - **Risk:** Negligible. The change is isolated to a string array. It cannot cause regressions for other devices because the strings are unique identifiers. - **Regression Potential:** Zero. Existing supported devices (`8C99`, `8C9C`) are untouched.
### 5. CONCLUSION This is a textbook example of a safe stable backport. While it technically adds support for "new" hardware, the Linux stable process explicitly allows adding Device IDs to existing drivers to ensure that users on long-term kernels can use new hardware revisions. The change is minimal, obviously correct, and fixes a functional deficiency for specific hardware models without impacting others.
**YES**
drivers/platform/x86/hp/hp-wmi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c index 8b3533d6ba091..9a668e2587952 100644 --- a/drivers/platform/x86/hp/hp-wmi.c +++ b/drivers/platform/x86/hp/hp-wmi.c @@ -92,8 +92,9 @@ static const char * const victus_thermal_profile_boards[] = { "8A25" };
-/* DMI Board names of Victus 16-r1000 and Victus 16-s1000 laptops */ +/* DMI Board names of Victus 16-r and Victus 16-s laptops */ static const char * const victus_s_thermal_profile_boards[] = { + "8BBE", "8BD4", "8BD5", "8C99", "8C9C" };