From: "Luke Jones" <luke@ljones.dev>
To: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
Cc: "Hans de Goede" <hdegoede@redhat.com>,
"Mohamed Ghanmi" <mohamed.ghanmi@supcom.tn>,
corentin.chary@gmail.com, platform-driver-x86@vger.kernel.org,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 1/1] platform/x86: asus-wmi: add support for vivobook fan profiles
Date: Wed, 05 Jun 2024 19:43:08 +1200 [thread overview]
Message-ID: <4de768c5-aae5-4fda-a139-a8b73c8495a1@app.fastmail.com> (raw)
In-Reply-To: <f126562f-54c8-de58-3f98-7375c129f66a@linux.intel.com>
On Mon, 3 Jun 2024, at 10:29 PM, Ilpo Järvinen wrote:
> On Mon, 3 Jun 2024, Luke Jones wrote:
> > On Mon, 29 Apr 2024, at 10:20 PM, Hans de Goede wrote:
> > > On 4/21/24 9:43 PM, Mohamed Ghanmi wrote:
> > > > Add support for vivobook fan profiles wmi call on the ASUS VIVOBOOK
> > > > to adjust power limits.
> > > >
> > > > These fan profiles have a different device id than the ROG series
> > > > and different order. This reorders the existing modes and adds a new
> > > > full speed mode available on these laptops.
> > > >
> > > > As part of keeping the patch clean the throttle_thermal_policy_available
> > > > boolean stored in the driver struct is removed and
> > > > throttle_thermal_policy_dev is used in place (as on init it is zeroed).
> > > >
> > > > Signed-off-by: Mohamed Ghanmi <mohamed.ghanmi@supcom.tn>
> > > > Co-developed-by: Luke D. Jones <luke@ljones.dev>
> > > > Signed-off-by: Luke D. Jones <luke@ljones.dev>
> > > > Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
> > > > ---
> > > > drivers/platform/x86/asus-wmi.c | 93 ++++++++++++----------
> > > > include/linux/platform_data/x86/asus-wmi.h | 1 +
> > > > 2 files changed, 51 insertions(+), 43 deletions(-)
> > > >
> > > > diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
> > > > index 3c61d75a3..1f54596ca 100644
> > > > --- a/drivers/platform/x86/asus-wmi.c
> > > > +++ b/drivers/platform/x86/asus-wmi.c
>
> > > > @@ -3747,7 +3753,10 @@ static ssize_t throttle_thermal_policy_store(struct device *dev,
> > > > return count;
> > > > }
> > > >
> > > > -// Throttle thermal policy: 0 - default, 1 - overboost, 2 - silent
> > > > +/*
> > > > + * Throttle thermal policy: 0 - default, 1 - overboost, 2 - silent
> > > > + * Throttle thermal policy vivobook : 0 - default, 1 - silent, 2 - overboost, 3 - fullspeed
> > > > + */
> > >
> > > throttle_thermal_policy_write() always expects normal (non vivobook) values and
> > > then translates those to vivo values, so this comment is not correct.
> > >
> > > The only difference is that vivobook also has fullspeed, but the way userspace
> > > sees it 1/2 or silent/overspeed are not swapped, since the swapping is taking
> > > care of in throttle_thermal_policy_write().
> > >
> > > Also the new fullspeed is not exported through the platform_profile interface,
> > > for setting values this is somewhat ok, but fullspeed can be set through
> > > sysfs, and this will then cause asus_wmi_platform_profile_get() to fail
> > > with -EINVAL, so this need to be fixed. Either map fullspeed to
> > > PLATFORM_PROFILE_PERFORMANCE in asus_wmi_platform_profile_get(), or add
> > > a new platform_profile value for this.
> > >
> >
> > I would much prefer if "fullspeed" was not included at all unless it was
> > an individual setting. It very rarely contributes anything good to the
> > driver, and most certainly won't be of value in the platform_profile.
> >
> > Otherwise, what is the status on this?
>
> Hi,
>
> I was expecting an update that addresses Hans' review comment.
>
> Luke, are you arguing that his comment is not valid and v3 is fine?
>
> (In any case, I've summoned v3 back from archive into active patches in
> patchwork so this doesn't get forgotten if v4 is not needed).
>
> --
> i.
Hi.
I am saying I would like to see ASUS_THROTTLE_THERMAL_POLICY_FULLSPEED removed, or placed somewhere else such as in <sysfs>/asus-nb-wmi/hwmon/hwmon3/pwm1_enable.
It certainly shouldn't be included in platform_profile and I'm not keen on seeing it in thorttle_thermal_policy either.
A lot of this reasoning is now coming from the refactor I've just done of asus-wmi and the "features" such as this one to place them under firmware_attributes class and begin deprecation of them in asus_wmi. From what I've achieved so far with it it is much *much* more suitable than this ad-hoc style of adding features I've been doing here (I'll submit this work soon, it repalces the last patch series I did).
In light of the above I'm considering the possibility of removing throttle_thermal_policy completely to wholly favour the use of platform_profile. It doesn't make all that much sense to have two different things manipulating the same thing - and as such I don't think the "full speed fan" setting fits at all with platform_profile as it is not a performance tweak.
Mohamed, I would be happy to include the Vivo support so long as:
1. the fullspeed setting is removed
2. the modes map correctly to platform_profile
I hope this makes sense. Very sorry about the previous brief response (I was recovering from surgery trauma).
Cheers,
Luke.
next prev parent reply other threads:[~2024-06-05 7:43 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-21 19:43 [PATCH v3 0/1] " Mohamed Ghanmi
2024-04-21 19:43 ` [PATCH v3 1/1] " Mohamed Ghanmi
2024-04-29 10:20 ` Hans de Goede
2024-06-03 5:19 ` Luke Jones
2024-06-03 10:29 ` Ilpo Järvinen
2024-06-05 7:43 ` Luke Jones [this message]
2024-06-21 9:43 ` Devin Bayer
2024-06-21 10:26 ` Luke Jones
2024-06-21 11:30 ` Devin Bayer
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=4de768c5-aae5-4fda-a139-a8b73c8495a1@app.fastmail.com \
--to=luke@ljones.dev \
--cc=corentin.chary@gmail.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mohamed.ghanmi@supcom.tn \
--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
all inboxes | Powered by JetHome®