From nobody Fri Jun 12 17:15:29 2026 Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) (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 41DE03AA4F8 for ; Wed, 13 May 2026 19:39:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778701187; cv=none; b=FBnJ12BG48kuVduTHasTuQr71poITEGt3H0XZYcxQ7b8shLV8Uyv+IADx3zMqO1hLUw7nPQz8N1lK6sbHh1fz4RWpOGCVNXKgI8jl1aWuAD1/TxmA5ABIuIeQZRQv63YkQLA9n2MpF2FGbsRTDPgLDZRYYTz5iyc3qLqokQOaUc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778701187; c=relaxed/simple; bh=8L9XyBDEciL5WEEmF1jOQRk81AWM4Zk1x71LAZ8MBTI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hL/4rWBhaRBEAO152TWI0jfhIKX7ZzBJG+WS+31ZJ6iCNBEETwzi1o6sglF+VEyZQvtaTf5KUKA81Tmc4NLlNB7auKLXvQQkfU/twnkiGMm7+HqAMOqQZVJJsHwVTSYy4erKNLbBD1bYZ8rD5GJ/NOpSgwGcuSb6aVsEoZ9qvFY= 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=dlMWe8nE; arc=none smtp.client-ip=209.85.214.171 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="dlMWe8nE" Received: by mail-pl1-f171.google.com with SMTP id d9443c01a7336-2bab2548e8bso34020635ad.0 for ; Wed, 13 May 2026 12:39:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778701184; x=1779305984; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mvqMlfps/2MIQrMqnTxZeXxhdXVuqBUVLTvsK3qKbEQ=; b=dlMWe8nEB2q1BmtlK+kSARQZF3kbGneyu0sme9RDZEWlKy4DXZ4ipTeTmknz5ROVLl ZmAdLlCqyJnYA+VuCfMg9NtHoS8qvVhosb0i13Gqahm/7fqweZPrAQys24X05DgGrujv TkDobK2H4qc097gaXr4lSIlchIP7QDRtlrmgSeI4YJJOu1N5paaM4WqESmiEFnfXYSiv j3x1a3Etc0IqzfEFfwVFxUbtEoxr8hJPzSuYis2Ixwgjiw1HXs1kC1n45/Rj+1sq7f1q LStZgBYMysAM/rB+EM/hrzZfX7MoFO3w/Ue9LAwwM+duiLDTMgtfBnv+b2YPyhFpNF3X zf9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778701184; x=1779305984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mvqMlfps/2MIQrMqnTxZeXxhdXVuqBUVLTvsK3qKbEQ=; b=eaIdnulaZhUgpYxqZXwULY/OYkSfOE/z4kofwX/qQYLpbuV804A/TPYWd2dwC7UzkM PoeWoB/YZbnrv31yuQkwPpaIatSMsRKhhY8bZIQ9yCYZQm5jipSALC5UYdHATKooha+L G6/ZAgcT00iuF/BGvzYZzAS3nJKej/fSdvxTkj0by6k8hU/okHwfre2CdR28eR16k7oa 4KKHZQn4UxUp0Aeym1f41HoM14/Wx4teqVdQOoEY9vvY6HDgxLOdqu+sUlkhgpstbuOL aSwiU9yCPcQftQnEj7cP0/exxLXZyRGCuScrHbgZs9JDkVDHMHY3dfi2dp87mJJg9sE8 6h/w== X-Forwarded-Encrypted: i=1; AFNElJ8Nar5j30XJ/ePiIJVyNkAOn2l1++rsxbXa0nqByADDlGKNFuSUNUsUe5Px3X/m9oZYtRvFXFYx2pn9kS0=@vger.kernel.org X-Gm-Message-State: AOJu0Yw3iTLi5mJ/9nfjk1e4gygftYUcFbiIW/8fuW0kX3OQM75tdXuk WU7owIdA9Ao6SP6v73oo3Dm2wYFtzyHXxN6mFlSkpD3sP3TM5sahRl7x X-Gm-Gg: Acq92OGGWES4eWBIU7Wjv/Gqoa+K+vVr+LsI8WN+q4Z0zZ+SEt7OLhLYQzF0u75tDLV Ud3R60yQMeKMeQuqDdXa7lsvfAMfbP1U0v4QUji2QfwxyT6R9ECEgK218MoDtQQt2urtpdWlZSo gzcFQCIj6AlwfCpqutA6v5N6WmojBnoiajZ6Zy/o+q1+DOSFEVtvltxoBiUXke8gsIuzzIFjig5 H2sbTeYUX5qZkXg1YosV1H+0QsnX1ObzD/3xZdmcv7uGwXKcgyGcEropDWDBKBscA/0HRNhb1P2 fu2V47iWFrTl+NgsZAQn9fBRgsDG9mdkQZHYyc9QRQPW6wWiwtCtqLvpMTu15nrQeJ6u8tYKq54 GHiYyHJR+a6LmA/UT5+rk6e7LVGJZhpkJYazKFW9FXLQbQjqVd8SOvo/IhTJlnIMcEuUgeVt4EU EWFarE+S92iw6dhkU0fIZP7Jf7WXEexA== X-Received: by 2002:a17:903:4b24:b0:2b0:6d56:8d29 with SMTP id d9443c01a7336-2bd30222604mr43304375ad.32.1778701184360; Wed, 13 May 2026 12:39:44 -0700 (PDT) Received: from cachyos.lan ([2607:fb90:b200:b454:58a0:7e4d:a0a:684b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bd5d11d659sm230595ad.73.2026.05.13.12.39.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 12:39:43 -0700 (PDT) From: foobisdweik To: Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, foobisdweik Subject: [PATCH 1/2] platform/x86: hp-wmi: Add support for Omen 16-b1xxx (8A13) Date: Wed, 13 May 2026 12:39:15 -0700 Message-ID: <20260513193916.84673-2-dweikmferris@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260513193916.84673-1-dweikmferris@gmail.com> References: <20260513193916.84673-1-dweikmferris@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add board name 8A13 (OMEN by HP Laptop 16-b1xxx, 12th-gen Intel/RTX 30 series) to the Omen thermal-profile, timed-thermal-profile, and Victus-S DMI lists. The 8A13 firmware exposes the standard Omen "PerformanceControl" WMI feature, uses the legacy EC thermal-profile offset (0x95), and implements the Victus-S-style GM2D/GM2E WMI methods at EC offsets 0xB0..0xB3 (RPM1..RPM4 tach) and 0x34..0x35 (SRP1/SRP2 setpoints). This makes it identical in interface to its same-era sibling 8A44 (Omen 16-n0xxx), so reuse omen_v1_legacy_thermal_params. After this change /sys/firmware/acpi/platform_profile reports cool/balanced/performance and the hp hwmon device exposes per-fan tachs plus the manual-mode pwm control on Omen 16-b1xxx. Signed-off-by: foobisdweik --- drivers/platform/x86/hp/hp-wmi.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-= wmi.c index 24c151289dd3..389506a6d2e3 100644 --- a/drivers/platform/x86/hp/hp-wmi.c +++ b/drivers/platform/x86/hp/hp-wmi.c @@ -157,7 +157,7 @@ static const char * const omen_thermal_profile_boards[]= =3D { "886B", "886C", "88C8", "88CB", "88D1", "88D2", "88F4", "88F5", "88F6", "88F7", "88FD", "88FE", "88FF", "8900", "8901", "8902", "8912", "8917", "8918", "8949", "894A", "89EB", - "8A15", "8A42", + "8A13", "8A15", "8A42", "8BAD", "8C58", "8E41", @@ -177,7 +177,7 @@ static const char * const omen_thermal_profile_force_v0= _boards[] =3D { * "balanced" when reaching zero. */ static const char * const omen_timed_thermal_profile_boards[] =3D { - "8A15", "8A42", + "8A13", "8A15", "8A42", "8BAD", }; =20 @@ -189,6 +189,10 @@ static const char * const victus_thermal_profile_board= s[] =3D { =20 /* DMI Board names of Victus 16-r and Victus 16-s laptops */ static const struct dmi_system_id victus_s_thermal_profile_boards[] __init= const =3D { + { + .matches =3D { DMI_MATCH(DMI_BOARD_NAME, "8A13") }, + .driver_data =3D (void *)&omen_v1_legacy_thermal_params, + }, { .matches =3D { DMI_MATCH(DMI_BOARD_NAME, "8A44") }, .driver_data =3D (void *)&omen_v1_legacy_thermal_params, --=20 2.54.0 From nobody Fri Jun 12 17:15:29 2026 Received: from mail-pj1-f49.google.com (mail-pj1-f49.google.com [209.85.216.49]) (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 CDF563B47E0 for ; Wed, 13 May 2026 19:39:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778701190; cv=none; b=tAwR6RR+8Nv1DoHvqmweMm4sQd0cooNi4b4ODDa3gfk0QvOOmrldP+fxDfHrbFyCeJ7uroOgfKZMU8xCJXEDb4zI7+n+u/+PCYdGeoVuEd6RX5zeaQ++nBjmlfjGhGycUArg587mCi4fVLUGrtZK2F9khVjEzV2FELQpRAcfCd4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778701190; c=relaxed/simple; bh=2LpbpK+U2F8gSPVy0ZsEE6DeZc0jwJ/UVGwHbr2t1Cs=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RlrS3pfbEpQ84Ed2IR4hPEpBO7Z6zyD+EtsPLZMCDGUazkGXc4pj1p5BaSszXrfjlEY7/m77ag/QZg50bfUoN0mQF+p5jIQhG0Fm4LCgWVg9eCLZWxKPFNG1E7fsdHQ3XvgXSn1HMWNFBKkzRkK3c/NlMNX1vXoaSVRqdgAy/GM= 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=Zld/bdEc; arc=none smtp.client-ip=209.85.216.49 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="Zld/bdEc" Received: by mail-pj1-f49.google.com with SMTP id 98e67ed59e1d1-368977e33b1so2290352a91.1 for ; Wed, 13 May 2026 12:39:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1778701188; x=1779305988; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=0VWaQJbUL9pRHD+HAski7/KKQkSw7u7kU3PLj+7Qq6o=; b=Zld/bdEcdkuTfJMlo6PjN297Sdl66NqeP4NDG2zEEHEg4xiFVNeEMjW96cvRuAOTV/ HvfzXZk5lgD1smQv4zjYBI/BxF6a/GZ7GLhlwEZOYsE0G2Thh2MqVqRLo9pveNlWiyV/ 3yl+hHjxzB/RpvEZn4OPK0DKaRIDdGzvWmsPXeX6dESwk+ebkw2BK07j6BabQjU86ufr QwI0n1mUaSGjDLOFkCjry1nZ69Epmf49u3fyH0J+oUBgd37zCjkGR3RrWQCIHzloeFoI siJSG9Ibfj69ojg74QtAJM0NDcW9+MwaEN4fQjKcsZkFXSaRgLwjsIg5PitTtc67RbO/ mTKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778701188; x=1779305988; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=0VWaQJbUL9pRHD+HAski7/KKQkSw7u7kU3PLj+7Qq6o=; b=KEsas9siWgoBlCsNJ1HWpcXPR5CVL7eIyA75N9NjKjxt0gJ9ELF49YNTUPyeHBoyZY H2isEEE1iQgKIENwquZ/wceqGs+g3DMt0xDgU24x/CcByQpE+Tx5i24IbSr++wLjPKYl ql7D9blwiGGV/yqevew/uAdQUOzo20wBIg+MabJDXk+wr7Cqhn977ZoeJj5VB0erK8Cz Ukw9sNVOCmAPcWKOrtlg6DGt20uxESOpkRpab4s4xc3zKROwqffxgDeRvBa5HEuLNjdq MOZtwAsjy1bToWmo1OzVoz6VGRYfRb/cB/SGDMBqVwusMXo5w03mvBFWbw/EeEwXKaR/ stAw== X-Forwarded-Encrypted: i=1; AFNElJ9VQtVmVjZTOXC0Tp33apwzteRU4yTpsIxT96Boav7HEUcz0O7hpdmQqabNVgidjN9Sc6rwOIkbmKrTvA8=@vger.kernel.org X-Gm-Message-State: AOJu0Ywd53iaTfQNUTFteAkSZ+xcGCC9JJmMSbsK0IsEVZD9xVnwcwkn JsRer4OzY0Pcs8gocYLzxHCpHMC+pjg7oEljd9lHca5KBQWHYNcVuZbROBvFXP4R X-Gm-Gg: Acq92OGV4WnGEl3VhbPHkS1HWcSgiQysDU14pftzNVRfCZbxz831klugD8pGMrv+sdl 7A6TsSSOap8Raa55iCtJM74Kz84AG7RnA0Utode+GBRsft6/QYCillTAtTls6zUVkZYQUDURIm9 XDKZBqFtTI79SXWwz6NCDgOt3Pj7/B5BgkQDlmewcjRaX3lBcdy87WlHyfUJoHYA2k26alcI+v4 dZo+mQJpEdsceer8MckeWda4kCSQUJ7+bUIX1W+uGIhzWN9DXO8bY5SIHMbHgbW6wJ3sW0Fm5NB IG1j1A+t9lOJBrQsRfvP9vn59O4SQ2JooyZqYNd4+lDig73We+A9jeDAQfr8gOwxYa76c/+ZKKM dTBtn0NysQApmm9MX2PgqLhTTMJO6IjFi/io1FJf6Cb4c66xlcqe276Gd4mKt9+EquoEimLIqpM v53Z0WbOyMKneYkxTsVG70C+64cXhH79O+oq8OOXuHIuDwmE5YMaI= X-Received: by 2002:a17:90b:4f92:b0:368:f179:ba07 with SMTP id 98e67ed59e1d1-368f3aa9f3cmr5029819a91.9.1778701187661; Wed, 13 May 2026 12:39:47 -0700 (PDT) Received: from cachyos.lan ([2607:fb90:b200:b454:58a0:7e4d:a0a:684b]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2bd5d11d659sm230595ad.73.2026.05.13.12.39.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 May 2026 12:39:47 -0700 (PDT) From: foobisdweik To: Hans de Goede , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= Cc: platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org, foobisdweik Subject: [PATCH 2/2] platform/x86: hp-wmi: Expose independent CPU/GPU pwm channels Date: Wed, 13 May 2026 12:39:16 -0700 Message-ID: <20260513193916.84673-3-dweikmferris@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260513193916.84673-1-dweikmferris@gmail.com> References: <20260513193916.84673-1-dweikmferris@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Victus-S WMI fan-speed-set query (HPWMI_VICTUS_S_FAN_SPEED_SET_QUERY, GM2E in firmware) takes a two-byte buffer [cpu, gpu] and writes the values to EC SRP1/SRP2 setpoints independently. The driver however drove both fans from a single hwmon pwm1 attribute, with the GPU value derived as cpu + priv->gpu_delta from the fan table. This makes asymmetric fan curves (common ask: GPU fan louder than CPU under heavy gaming load) impossible from userspace fan-control tools that expect one pwm attribute per fan. Promote priv->pwm to a two-element array, add a second pwm hwmon channel, and extend hp_wmi_hwmon_write() / hp_wmi_apply_fan_settings() to drive the per-channel setpoints through GM2E. The U8_MAX sentinel in hp_wmi_fan_speed_set() selects the new per-fan path; existing callers using HP_FAN_SPEED_AUTOMATIC or a direct rpm value keep their behavior. The second pwm channel is only visible on Victus-S-capable boards, since other HP laptops still use the legacy single-fan WMI commands. Tested on OMEN by HP Laptop 16-b1xxx (8A13): writing pwm1=3D60, pwm2=3D200 in manual mode drives CPU fan to ~1600 RPM and GPU fan to ~5700 RPM simultaneously, verified via fan1_input/fan2_input tachs and direct read of EC offsets 0xB0..0xB3. Signed-off-by: foobisdweik --- drivers/platform/x86/hp/hp-wmi.c | 45 +++++++++++++++++++++++--------- 1 file changed, 32 insertions(+), 13 deletions(-) diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-= wmi.c index 389506a6d2e3..40eb3715583a 100644 --- a/drivers/platform/x86/hp/hp-wmi.c +++ b/drivers/platform/x86/hp/hp-wmi.c @@ -486,7 +486,7 @@ struct hp_wmi_hwmon_priv { u8 max_rpm; int gpu_delta; u8 mode; - u8 pwm; + u8 pwm[2]; struct delayed_work keep_alive_dwork; }; =20 @@ -822,12 +822,18 @@ static int hp_wmi_fan_speed_set(struct hp_wmi_hwmon_p= riv *priv, u8 speed) fan_speed[GPU_FAN] =3D speed; =20 /* - * GPU fan speed is always a little higher than CPU fan speed, we fetch - * this delta value from the fan table during hwmon init. - * Exception: Speed is set to HP_FAN_SPEED_AUTOMATIC, to revert to - * automatic mode. + * Pass-through value U8_MAX: drive each fan from its own + * priv->pwm[] setpoint converted via pwm_to_rpm(). Used by the + * hwmon pwm1/pwm2 path that allows independent CPU/GPU fan control. + * + * Otherwise: GPU fan speed is always a little higher than CPU fan + * speed; we fetch this delta from the fan table during hwmon init. + * Exception: HP_FAN_SPEED_AUTOMATIC reverts to automatic mode. */ - if (speed !=3D HP_FAN_SPEED_AUTOMATIC) { + if (speed =3D=3D U8_MAX) { + fan_speed[CPU_FAN] =3D pwm_to_rpm(priv->pwm[CPU_FAN], priv); + fan_speed[GPU_FAN] =3D pwm_to_rpm(priv->pwm[GPU_FAN], priv); + } else if (speed !=3D HP_FAN_SPEED_AUTOMATIC) { gpu_speed =3D speed + priv->gpu_delta; fan_speed[GPU_FAN] =3D clamp_val(gpu_speed, 0, U8_MAX); } @@ -2398,7 +2404,7 @@ static int hp_wmi_apply_fan_settings(struct hp_wmi_hw= mon_priv *priv) case PWM_MODE_MANUAL: if (!is_victus_s_thermal_profile()) return -EOPNOTSUPP; - ret =3D hp_wmi_fan_speed_set(priv, pwm_to_rpm(priv->pwm, priv)); + ret =3D hp_wmi_fan_speed_set(priv, U8_MAX); if (ret < 0) return ret; mod_delayed_work(system_wq, &priv->keep_alive_dwork, @@ -2429,6 +2435,12 @@ static umode_t hp_wmi_hwmon_is_visible(const void *d= ata, { switch (type) { case hwmon_pwm: + /* + * Second pwm channel only exists on Victus-S-style boards + * which expose an independent GPU fan setpoint. + */ + if (channel =3D=3D 1 && !is_victus_s_thermal_profile()) + return 0; if (attr =3D=3D hwmon_pwm_input && !is_victus_s_thermal_profile()) return 0; return 0644; @@ -2514,7 +2526,7 @@ static int hp_wmi_hwmon_write(struct device *dev, enu= m hwmon_sensor_types type, /* ensure PWM input is within valid fan speeds */ rpm =3D pwm_to_rpm(val, priv); rpm =3D clamp_val(rpm, priv->min_rpm, priv->max_rpm); - priv->pwm =3D rpm_to_pwm(rpm, priv); + priv->pwm[channel] =3D rpm_to_pwm(rpm, priv); return hp_wmi_apply_fan_settings(priv); } switch (val) { @@ -2525,13 +2537,18 @@ static int hp_wmi_hwmon_write(struct device *dev, e= num hwmon_sensor_types type, if (!is_victus_s_thermal_profile()) return -EOPNOTSUPP; /* - * When switching to manual mode, set fan speed to - * current RPM values to ensure a smooth transition. + * When switching to manual mode, seed each per-fan + * setpoint from its current measured RPM so the + * transition is smooth. */ - rpm =3D hp_wmi_get_fan_speed_victus_s(channel); + rpm =3D hp_wmi_get_fan_speed_victus_s(CPU_FAN); + if (rpm < 0) + return rpm; + priv->pwm[CPU_FAN] =3D rpm_to_pwm(rpm / 100, priv); + rpm =3D hp_wmi_get_fan_speed_victus_s(GPU_FAN); if (rpm < 0) return rpm; - priv->pwm =3D rpm_to_pwm(rpm / 100, priv); + priv->pwm[GPU_FAN] =3D rpm_to_pwm(rpm / 100, priv); priv->mode =3D PWM_MODE_MANUAL; return hp_wmi_apply_fan_settings(priv); case PWM_MODE_AUTO: @@ -2547,7 +2564,9 @@ static int hp_wmi_hwmon_write(struct device *dev, enu= m hwmon_sensor_types type, =20 static const struct hwmon_channel_info * const info[] =3D { HWMON_CHANNEL_INFO(fan, HWMON_F_INPUT, HWMON_F_INPUT), - HWMON_CHANNEL_INFO(pwm, HWMON_PWM_ENABLE | HWMON_PWM_INPUT), + HWMON_CHANNEL_INFO(pwm, + HWMON_PWM_ENABLE | HWMON_PWM_INPUT, + HWMON_PWM_ENABLE | HWMON_PWM_INPUT), NULL }; =20 --=20 2.54.0