public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Krishna Chomal <krishna.chomal108@gmail.com>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: Hans de Goede <hansg@kernel.org>,
	platform-driver-x86@vger.kernel.org,
	 LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v5 2/2] platform/x86: hp-wmi: Add EC offsets to read Victus S thermal profile
Date: Wed, 21 Jan 2026 16:00:07 +0530	[thread overview]
Message-ID: <aXCnMsxMJ5Nio0Tr@archlinux> (raw)
In-Reply-To: <b2be1f6c-4f2e-cbb1-af52-46a85ecd5edd@linux.intel.com>

On Tue, Jan 20, 2026 at 05:10:00PM +0200, Ilpo Järvinen wrote:
[snip]
>> I agree that iterative EC reads are not ideal. However, since these two
>> offsets (0x95 and 0x59) cover all (or almost all) known Victus/Omen layouts,
>> the risk of "hoping" is low.
>>
>> Storing them at compile time in the victus_s array as a part of
>> .driver_data is indeed the best thing. But since we do not know what EC
>> layout is followed by the existing boards in the array, we can take a
>> hybrid approach here:
>> 1. I (and subsequent additions) will store their EC offset in the
>>    .driver_data field struct.
>> 2. For already existing boards we will perform this iterative probe once
>>    during init, and store it somewhere common.
>> 3. Then platform_profile_victus_s_get_ec() can simply use this "definite"
>>    offset to perform the EC read.
>
>I guess we'll have to settle to that but it likely means we'll never be
>able to source those offsets because things appear "working" and therefore
>cannot get rid of the extra code necessary for the EC offset iteration.
>
>Another alternative would be to add pr_warn() if we don't have the EC
>offset yet for a board and not read anything (and hope somebody who has
>one of those boards will come to us with the information or patch).
>
>-- 
> i.

Hi Ilpo,

That is a very fair point, if the driver just works, we would never get
the actual offsets. I have adopted a stricter version for v6:
1. I removed the iterative probing entirely.
2. Added a pr_warn() in setup_active_thermal_profile_params() for
    unknown boards.
3. Known boards (like 8C78) now have their offsets hardcoded in the DMI
    table.

This ensures that thermal profile readback is only enabled when we have
definite hardware data. I will send v6, based on the for-next branch,
shortly after thorough testing.

Thanks for the guidance!

  reply	other threads:[~2026-01-21 10:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251218124303.22024-1-krishna.chomal108@gmail.com>
2026-01-13 18:26 ` [PATCH v5 0/2] Fix Omen 16-wf1xxx thermal profile and add EC readback Krishna Chomal
2026-01-13 18:26   ` [PATCH v5 1/2] platform/x86: hp-wmi: fix platform profile values for Omen 16-wf1xxx Krishna Chomal
2026-01-13 18:26   ` [PATCH v5 2/2] platform/x86: hp-wmi: Add EC offsets to read Victus S thermal profile Krishna Chomal
2026-01-15 13:26     ` Ilpo Järvinen
2026-01-16 15:11       ` Krishna Chomal
2026-01-20 15:10         ` Ilpo Järvinen
2026-01-21 10:30           ` Krishna Chomal [this message]
2026-01-21 18:28   ` [PATCH v6] " Krishna Chomal
2026-01-28 13:06   ` [PATCH v5 0/2] Fix Omen 16-wf1xxx thermal profile and add EC readback Ilpo Järvinen
2026-01-31 10:56     ` 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=aXCnMsxMJ5Nio0Tr@archlinux \
    --to=krishna.chomal108@gmail.com \
    --cc=hansg@kernel.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /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