platform/x86: acer-wmi: Extend support for Acer Nitro AN515-58
Subsystems (2)
PATCH 1/2 platform/x86: acer-wmi: Extend support for Acer Nitro AN515-58
The Acer Nitro AN515-58 additionally supports fan control. Modify the quirk list to enable said feature on this machine.
--- drivers/platform/x86/acer-wmi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
drivers/platform/x86/acer-wmi.c +6 -1
@@ -455,6 +455,11 @@ static struct quirk_entry quirk_acer_travelmate_2490 = { .mailled = 1, }; +static struct quirk_entry quirk_acer_nitro_an515_58 = { + .predator_v4 =1 , + .pwm =1 , +}; +static struct quirk_entry quirk_acer_predator_ph315_53 = { .turbo =1 , .cpu_fans =1 ,
@@ -655,7 +660,7 @@ static const struct dmi_system_id acer_quirks[] __initconst = {DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), DMI_MATCH(DMI_PRODUCT_NAME, "Nitro AN515-58"), }, - .driver_data = &quirk_acer_predator_v4, + .driver_data = &quirk_acer_nitro_an515_58, }, { .callback = dmi_matched,
Signature · 1 line
2.52.0
PATCH 2/2 platform/x86: acer-wmi: Fix missing capability check
During the rework of the fan behavior control code in commit d8e8362b09d3 ("platform/x86: acer-wmi: Fix setting of fan behavior"), acer_toggle_turbo() was changed to use WMID_gaming_set_fan_behavior() instead of WMID_gaming_set_u64() when switching the fans to turbo mode. The new function however does not check if the necessary capability (ACER_CAP_TURBO_FAN) is actually enabled on a given machine, causing the driver to potentially access unsupported features.
Fix this by manually checking if ACER_CAP_TURBO_FAN is enabled on a given machine before changing the fan mode.
--- drivers/platform/x86/acer-wmi.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/platform/x86/acer-wmi.c +4 -2
@@ -2070,7 +2070,8 @@ static int acer_toggle_turbo(void)WMID_gaming_set_u64 (0x1 ,ACER_CAP_TURBO_LED );/* Set FAN mode to auto */ -WMID_gaming_set_fan_mode (ACER_WMID_FAN_MODE_AUTO ); +if (has_cap (ACER_CAP_TURBO_FAN )) +WMID_gaming_set_fan_mode (ACER_WMID_FAN_MODE_AUTO );/* Set OC to normal */ if (has_cap (ACER_CAP_TURBO_OC )) {
@@ -2084,7 +2085,8 @@ static int acer_toggle_turbo(void)WMID_gaming_set_u64 (0x10001 ,ACER_CAP_TURBO_LED );/* Set FAN mode to turbo */ -WMID_gaming_set_fan_mode (ACER_WMID_FAN_MODE_TURBO ); +if (has_cap (ACER_CAP_TURBO_FAN )) +WMID_gaming_set_fan_mode (ACER_WMID_FAN_MODE_TURBO );/* Set OC to turbo mode */ if (has_cap (ACER_CAP_TURBO_OC )) {
Signature · 1 line
2.52.0
Am 08.01.26 um 17:45 schrieb Armin Wolf:
Quoted 2 lines
The Acer Nitro AN515-58 additionally supports fan control. Modify the quirk list to enable said feature on this machine.
Any updates on this?
Thanks,
Armin Wolf
Quoted 33 lines
Reported-by Pranay Pawar <[email protected]>Closes https://lore.kernel.org/platform-driver-x86/CACy5qBaFv_L5y_nGJU_3pd3CXbFZrUAE18y5Fc-hnAmrd8bSLA@mail.gmail.com/ open hereTested-by Pranay Pawar <[email protected]>Signed-off-by Armin Wolf <[email protected]>--- drivers/platform/x86/acer-wmi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)drivers/platform/x86/acer-wmi.c +6
-1@@ -455,6 +455,11 @@ static struct quirk_entry quirk_acer_travelmate_2490 = { .mailled = 1, }; +static struct quirk_entry quirk_acer_nitro_an515_58 = { + .predator_v4 =1 , + .pwm =1 , +}; +static struct quirk_entry quirk_acer_predator_ph315_53 = { .turbo =1 , .cpu_fans =1 ,@@ -655,7 +660,7 @@ static const struct dmi_system_id acer_quirks[] __initconst = {DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ),DMI_MATCH (DMI_PRODUCT_NAME ,"Nitro AN515-58" ), }, - .driver_data = &quirk_acer_predator_v4, + .driver_data = &quirk_acer_nitro_an515_58, }, { .callback = dmi_matched,
Ilpo Järvinen
maintainerQuoted 6 lines · Armin Wolf
Am 08.01.26 um 17:45 schrieb Armin Wolf:
Quoted 2 lines
The Acer Nitro AN515-58 additionally supports fan control. Modify the quirk list to enable said feature on this machine.
Any updates on this?
Hi,
I'm sorry, I thought I had applied this (and it was marked as accepted in patchwork as well as a result) but apparently hadn't. Thanks for the reminder.
Now it's in the review-ilpo-fixes branch.
Signature · 1 line
i.
Am 20.01.26 um 16:13 schrieb Ilpo Järvinen:
Quoted 6 lines · Armin Wolf
Quoted 5 lines
Am 08.01.26 um 17:45 schrieb Armin Wolf:
Quoted 2 lines
The Acer Nitro AN515-58 additionally supports fan control. Modify the quirk list to enable said feature on this machine.
Quoted 9 lines
Quoted 1 line
Any updates on this?
Hi,
I'm sorry, I thought I had applied this (and it was marked as accepted in patchwork as well as a result) but apparently hadn't. Thanks for the reminder.
Now it's in the review-ilpo-fixes branch.
Mistakes happen, thank you :).