Re: acer-wmi: Improving WMI support for Predator/Nitro laptops

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02.10.2024 08:40, Armin Wolf wrote:
the documentation at https://docs.kernel.org/userspace-api/sysfs-platform_profile.html says:

"It is explicitly NOT a goal of this API to let userspace know about any sub-optimal conditions
which are impeding reaching the requested performance level."

OK, I misread this statement. Now I realize that we should always
report all supported profiles and, in particular, not report errors if
the desired profile cannot be set at the moment.

So i think the acer-wmi driver should automatically switch to turbo mode if:

1. Turbo mode is currently selected.
2. It receives event 9 indicating that it can switch to turbo mode.

I think commit d23430233494 ("platform/x86: hp-wmi: Fix platform profile option switch bug on Omen and Victus laptops") might be a good example on what to do in such a situation. Exporting the availability of turbo mode via sysfs is optional.

Please note that you cannot modify platform_profile_handler.choices at runtime, so you have to "hide" such things like
"cannot reach turbo mode yet" from userspace.

Thanks,
Armin Wolf
Thank you for the hint, I will implement the similar logic for the acer-wmi driver as well. It seems that being able to set any desired platform profile and store it in an internal
variable makes the design cleaner.

In that case, exporting the actual availability of high-performance profiles in
via additional sysfs file would still be useful for userspace.

Will come back with the patches later, thanks!





[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux