drivers/platform/x86/acer-wmi.c | 315 ++++++++++++++++++++++++++-------------- 1 file changed, 203 insertions(+), 112 deletions(-)
This patch improves the platform profile handling for laptops using the
Acer Predator interface by making the following changes -
1) Using WMI calls to fetch the current platform profile instead of
directly accessing it from the EC. A new helper function is
introduced for this purpose.
2) Simplifying the cycling of platform profiles by making use of
platform_profile_cycle()
3) Using an ACPI bitmap to dynamically set platform_profile_choices to
better reflect the supported profiles.
The last patch also adds support for the Acer Nitro AN515-58 by adding
it to the quirk list.
Signed-off-by: Hridesh MG <hridesh699@gmail.com>
---
v1->v2:
[1/3]
- Fixed enum member alignment and reordered them
[2/3]
- Made use of test_bit to check bitmap values
- Replaced magic numbers with proper variables
Link to v1: https://lore.kernel.org/platform-driver-x86/20241231140442.10076-1-hridesh699@gmail.com/
v2->v3:
[1/5]
- Removed a line which was supposed to be in another patch
[3/5]
- Moved checking of max performance profile to [4/5]
- Restored code in profile_set which updates last_non_turbo_profile
Moved the supported profiles patch closer to the end of the series
Link to v2: https://lore.kernel.org/r/20250104-platform_profile-v2-0-b58164718903@gmail.com
---
Changes in v4:
[3/5]
- last turbo profile is only updated after a successful WMI call
[4/5]
- most performant profile is set during profile setup
- Link to v3: https://lore.kernel.org/r/20250108-platform_profile-v3-0-ec3658d9be9c@gmail.com
---
Hridesh MG (5):
platform/x86: acer-wmi: use WMI calls for platform profile handling
platform/x86: acer-wmi: use new helper function for setting overclocks
platform/x86: acer-wmi: simplify platform profile cycling
platform/x86: acer-wmi: use an ACPI bitmap to set the platform profile choices
platform/x86: acer-wmi: add support for Acer Nitro AN515-58
drivers/platform/x86/acer-wmi.c | 315 ++++++++++++++++++++++++++--------------
1 file changed, 203 insertions(+), 112 deletions(-)
---
base-commit: 8155b4ef3466f0e289e8fcc9e6e62f3f4dceeac2
change-id: 20250102-platform_profile-fc1e0aaf2900
Best regards,
--
Hridesh MG <hridesh699@gmail.com>
On Mon, 13 Jan 2025 18:44:08 +0530, Hridesh MG wrote:
> This patch improves the platform profile handling for laptops using the
> Acer Predator interface by making the following changes -
>
> 1) Using WMI calls to fetch the current platform profile instead of
> directly accessing it from the EC. A new helper function is
> introduced for this purpose.
> 2) Simplifying the cycling of platform profiles by making use of
> platform_profile_cycle()
> 3) Using an ACPI bitmap to dynamically set platform_profile_choices to
> better reflect the supported profiles.
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
The list of commits applied:
[1/5] platform/x86: acer-wmi: use WMI calls for platform profile handling
commit: 2d76708c2221dde33d86aeef19f6d7d5f62148b4
[2/5] platform/x86: acer-wmi: use new helper function for setting overclocks
commit: cd44e09bb89d4a33514b9ec3d972f0d2d13f5cfd
[3/5] platform/x86: acer-wmi: simplify platform profile cycling
commit: 61c461a90fbfc038d9663713f293d60fcb58c41d
[4/5] platform/x86: acer-wmi: use an ACPI bitmap to set the platform profile choices
commit: 191e21f1a4c3948957adc037734449f4a965dec5
[5/5] platform/x86: acer-wmi: add support for Acer Nitro AN515-58
commit: 549fcf58cf5837d401d0de906093169b05365609
--
i.
On Wed, Jan 15, 2025 at 8:07 PM Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> wrote: > > On Mon, 13 Jan 2025 18:44:08 +0530, Hridesh MG wrote: > > > This patch improves the platform profile handling for laptops using the > > Acer Predator interface by making the following changes - > > > > 1) Using WMI calls to fetch the current platform profile instead of > > directly accessing it from the EC. A new helper function is > > introduced for this purpose. > > 2) Simplifying the cycling of platform profiles by making use of > > platform_profile_cycle() > > 3) Using an ACPI bitmap to dynamically set platform_profile_choices to > > better reflect the supported profiles. > > > > [...] > > > Thank you for your contribution, it has been applied to my local > review-ilpo-next branch. Note it will show up in the public > platform-drivers-x86/review-ilpo-next branch only once I've pushed my > local branch there, which might take a while. > > The list of commits applied: > [1/5] platform/x86: acer-wmi: use WMI calls for platform profile handling > commit: 2d76708c2221dde33d86aeef19f6d7d5f62148b4 > [2/5] platform/x86: acer-wmi: use new helper function for setting overclocks > commit: cd44e09bb89d4a33514b9ec3d972f0d2d13f5cfd > [3/5] platform/x86: acer-wmi: simplify platform profile cycling > commit: 61c461a90fbfc038d9663713f293d60fcb58c41d > [4/5] platform/x86: acer-wmi: use an ACPI bitmap to set the platform profile choices > commit: 191e21f1a4c3948957adc037734449f4a965dec5 > [5/5] platform/x86: acer-wmi: add support for Acer Nitro AN515-58 > commit: 549fcf58cf5837d401d0de906093169b05365609 > > -- > i. > Awesome, thanks a lot! I would like to once again thank Armin Wolf and Kurt Borja for their guidance and help in creating this patchset, this is my first meaningful [ to me atleast :) ] contribution to the kernel and I'm quite proud of it. Working on this issue was pretty fun and I learnt a lot regarding different things, it really did make me appreciate kernel developers even more. -- Thanks, Hridesh MG
On Wed, Jan 15, 2025 at 08:53:12PM +0530, Hridesh MG wrote: > On Wed, Jan 15, 2025 at 8:07 PM Ilpo Järvinen > <ilpo.jarvinen@linux.intel.com> wrote: > > > > On Mon, 13 Jan 2025 18:44:08 +0530, Hridesh MG wrote: > > > > > This patch improves the platform profile handling for laptops using the > > > Acer Predator interface by making the following changes - > > > > > > 1) Using WMI calls to fetch the current platform profile instead of > > > directly accessing it from the EC. A new helper function is > > > introduced for this purpose. > > > 2) Simplifying the cycling of platform profiles by making use of > > > platform_profile_cycle() > > > 3) Using an ACPI bitmap to dynamically set platform_profile_choices to > > > better reflect the supported profiles. > > > > > > [...] > > > > > > Thank you for your contribution, it has been applied to my local > > review-ilpo-next branch. Note it will show up in the public > > platform-drivers-x86/review-ilpo-next branch only once I've pushed my > > local branch there, which might take a while. > > > > The list of commits applied: > > [1/5] platform/x86: acer-wmi: use WMI calls for platform profile handling > > commit: 2d76708c2221dde33d86aeef19f6d7d5f62148b4 > > [2/5] platform/x86: acer-wmi: use new helper function for setting overclocks > > commit: cd44e09bb89d4a33514b9ec3d972f0d2d13f5cfd > > [3/5] platform/x86: acer-wmi: simplify platform profile cycling > > commit: 61c461a90fbfc038d9663713f293d60fcb58c41d > > [4/5] platform/x86: acer-wmi: use an ACPI bitmap to set the platform profile choices > > commit: 191e21f1a4c3948957adc037734449f4a965dec5 > > [5/5] platform/x86: acer-wmi: add support for Acer Nitro AN515-58 > > commit: 549fcf58cf5837d401d0de906093169b05365609 > > > > -- > > i. > > > Awesome, thanks a lot! I would like to once again thank Armin Wolf and > Kurt Borja for their guidance and help in creating this patchset, this > is my first meaningful [ to me atleast :) ] contribution to the kernel > and I'm quite proud of it. Working on this issue was pretty fun and I > learnt a lot regarding different things, it really did make me > appreciate kernel developers even more. Hi Hridesh, I'm pretty much still a newbie, so I'm glad I could help :) It is really fun to contribute to this community. ~ Kurt > > -- > Thanks, > Hridesh MG
Am 15.01.25 um 16:23 schrieb Hridesh MG: > On Wed, Jan 15, 2025 at 8:07 PM Ilpo Järvinen > <ilpo.jarvinen@linux.intel.com> wrote: >> On Mon, 13 Jan 2025 18:44:08 +0530, Hridesh MG wrote: >> >>> This patch improves the platform profile handling for laptops using the >>> Acer Predator interface by making the following changes - >>> >>> 1) Using WMI calls to fetch the current platform profile instead of >>> directly accessing it from the EC. A new helper function is >>> introduced for this purpose. >>> 2) Simplifying the cycling of platform profiles by making use of >>> platform_profile_cycle() >>> 3) Using an ACPI bitmap to dynamically set platform_profile_choices to >>> better reflect the supported profiles. >>> >>> [...] >> >> Thank you for your contribution, it has been applied to my local >> review-ilpo-next branch. Note it will show up in the public >> platform-drivers-x86/review-ilpo-next branch only once I've pushed my >> local branch there, which might take a while. >> >> The list of commits applied: >> [1/5] platform/x86: acer-wmi: use WMI calls for platform profile handling >> commit: 2d76708c2221dde33d86aeef19f6d7d5f62148b4 >> [2/5] platform/x86: acer-wmi: use new helper function for setting overclocks >> commit: cd44e09bb89d4a33514b9ec3d972f0d2d13f5cfd >> [3/5] platform/x86: acer-wmi: simplify platform profile cycling >> commit: 61c461a90fbfc038d9663713f293d60fcb58c41d >> [4/5] platform/x86: acer-wmi: use an ACPI bitmap to set the platform profile choices >> commit: 191e21f1a4c3948957adc037734449f4a965dec5 >> [5/5] platform/x86: acer-wmi: add support for Acer Nitro AN515-58 >> commit: 549fcf58cf5837d401d0de906093169b05365609 >> >> -- >> i. >> > Awesome, thanks a lot! I would like to once again thank Armin Wolf and > Kurt Borja for their guidance and help in creating this patchset, this > is my first meaningful [ to me atleast :) ] contribution to the kernel > and I'm quite proud of it. Working on this issue was pretty fun and I > learnt a lot regarding different things, it really did make me > appreciate kernel developers even more. > Thank you :). Your patch will not only be meaningful to you, since all other users of acer-wmi will now enjoy improved platform profile support for their machines. Thanks, Armin Wolf
© 2016 - 2025 Red Hat, Inc.