From: Krishna Chomal <krishna.chomal108@gmail.com>
To: Radhey Kalra <radheykalra901@gmail.com>
Cc: platform-driver-x86@vger.kernel.org, ilpo.jarvinen@linux.intel.com
Subject: Re: [PATCH v6 3/4] platform/x86: hp-wmi: Skip zero GPU RPM rows for fan speed delta
Date: Thu, 21 May 2026 19:42:06 +0530 [thread overview]
Message-ID: <ag8QsXGZziywo0SX@archlinux> (raw)
In-Reply-To: <20260521133351.1512718-4-radheykalra901@gmail.com>
On Thu, May 21, 2026 at 07:03:50PM +0530, Radhey Kalra wrote:
>Some Victus fan tables start with a CPU RPM value while the GPU RPM
>field is zero. On board 8A3D the first row is cpu=23, gpu=0, noise=25,
>followed by cpu=24, gpu=22, noise=26.
>
>Derive gpu_delta from the first row that contains a non-zero GPU RPM
>instead of unconditionally using row 0.
I agree, this is essential for fan-control to work sensibly. But I just
want to give Ilpo Jarvinen a quick heads-up because this would likely
cause conflict with foobisdweik's patch [1], as they would (probably)
remove gpu_delta in v2 [2]
[1]: https://lore.kernel.org/platform-driver-x86/20260513193916.84673-3-dweikmferris@gmail.com
[2]: https://lore.kernel.org/platform-driver-x86/ag2DCOGyCt7MBUL6@archlinux
>Signed-off-by: Radhey Kalra <radheykalra901@gmail.com>
>---
> 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 ae2abb9..dcfffe6 100644
>--- a/drivers/platform/x86/hp/hp-wmi.c
>+++ b/drivers/platform/x86/hp/hp-wmi.c
>@@ -2666,6 +2666,7 @@ static int hp_wmi_setup_fan_settings(struct hp_wmi_hwmon_priv *priv)
> u8 min_rpm, max_rpm;
> u8 cpu_rpm, gpu_rpm, noise_db;
> int gpu_delta, i, num_entries, ret;
>+ bool gpu_delta_found = false;
> size_t header_size, entry_size;
>
> /* Default behaviour on hwmon init is automatic mode */
>@@ -2706,12 +2707,15 @@ static int hp_wmi_setup_fan_settings(struct hp_wmi_hwmon_priv *priv)
> min_rpm = cpu_rpm;
> if (cpu_rpm > max_rpm)
> max_rpm = cpu_rpm;
>+ if (!gpu_delta_found && gpu_rpm > 0) {
>+ gpu_delta = gpu_rpm - cpu_rpm;
>+ gpu_delta_found = true;
>+ }
> }
>
>- if (min_rpm == U8_MAX || max_rpm == 0)
>+ if (min_rpm == U8_MAX || max_rpm == 0 || !gpu_delta_found)
> return -EINVAL;
>
>- gpu_delta = fan_table->entries[0].gpu_rpm - fan_table->entries[0].cpu_rpm;
> priv->min_rpm = min_rpm;
> priv->max_rpm = max_rpm;
> priv->gpu_delta = gpu_delta;
>--
>2.54.0
>
next prev parent reply other threads:[~2026-05-21 14:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-21 13:33 [PATCH v6 0/4] platform/x86: hp-wmi: Add Victus 15-fb0xxx fan control Radhey Kalra
2026-05-21 13:33 ` [PATCH v6 1/4] platform/x86: hp-wmi: Introduce board-specific feature data Radhey Kalra
2026-05-21 13:33 ` [PATCH v6 2/4] platform/x86: hp-wmi: Drive fan control from board data Radhey Kalra
2026-05-21 13:33 ` [PATCH v6 3/4] platform/x86: hp-wmi: Skip zero GPU RPM rows for fan speed delta Radhey Kalra
2026-05-21 14:12 ` Krishna Chomal [this message]
2026-05-22 13:56 ` Ilpo Järvinen
2026-05-23 4:39 ` Krishna Chomal
2026-05-21 13:33 ` [PATCH v6 4/4] platform/x86: hp-wmi: Add Victus 15-fb0xxx fan control Radhey Kalra
2026-05-21 14:02 ` [PATCH v6 0/4] " Krishna Chomal
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ag8QsXGZziywo0SX@archlinux \
--to=krishna.chomal108@gmail.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=radheykalra901@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox