Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

acer-wmi: add quirk table for video backlight vendor mode

There have some acer laptop have broken _BCM implemenation, the AML
code wrote value to EC register but firmware didn't change brighenss.

Fortunately, the brightness control works on those machines with
vendor mode. So, add quirk table for video backlight vendor mode
and unregister acpi video interface on those machines.

Tested on Acer TravelMate 4750

Cc: Carlos Corbacho <carlos@strangeworlds.co.uk>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Corentin Chary <corentincj@iksaif.net>
Cc: Thomas Renninger <trenn@suse.de>
Signed-off-by: Lee, Chun-Yi <jlee@suse.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>

authored by

Lee, Chun-Yi and committed by
Matthew Garrett
86924de2 41603e97

+31 -2
+4
drivers/platform/x86/Kconfig
··· 26 26 depends on RFKILL || RFKILL = n 27 27 depends on ACPI_WMI 28 28 select INPUT_SPARSEKMAP 29 + # Acer WMI depends on ACPI_VIDEO when ACPI is enabled 30 + # but for select to work, need to select ACPI_VIDEO's dependencies, ick 31 + select VIDEO_OUTPUT_CONTROL if ACPI 32 + select ACPI_VIDEO if ACPI 29 33 ---help--- 30 34 This is a driver for newer Acer (and Wistron) laptops. It adds 31 35 wireless radio and bluetooth control, and on some laptops,
+27 -2
drivers/platform/x86/acer-wmi.c
··· 43 43 #include <linux/input/sparse-keymap.h> 44 44 45 45 #include <acpi/acpi_drivers.h> 46 + #include <acpi/video.h> 46 47 47 48 MODULE_AUTHOR("Carlos Corbacho"); 48 49 MODULE_DESCRIPTION("Acer Laptop WMI Extras Driver"); ··· 503 502 DMI_MATCH(DMI_PRODUCT_NAME, "0687A31"), 504 503 }, 505 504 .driver_data = &quirk_fujitsu_amilo_li_1718, 505 + }, 506 + {} 507 + }; 508 + 509 + static int video_set_backlight_video_vendor(const struct dmi_system_id *d) 510 + { 511 + interface->capability &= ~ACER_CAP_BRIGHTNESS; 512 + pr_info("Brightness must be controlled by generic video driver\n"); 513 + return 0; 514 + } 515 + 516 + static const struct dmi_system_id video_vendor_dmi_table[] = { 517 + { 518 + .callback = video_set_backlight_video_vendor, 519 + .ident = "Acer TravelMate 4750", 520 + .matches = { 521 + DMI_MATCH(DMI_BOARD_VENDOR, "Acer"), 522 + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate 4750"), 523 + }, 506 524 }, 507 525 {} 508 526 }; ··· 2037 2017 set_quirks(); 2038 2018 2039 2019 if (acpi_video_backlight_support()) { 2040 - interface->capability &= ~ACER_CAP_BRIGHTNESS; 2041 - pr_info("Brightness must be controlled by generic video driver\n"); 2020 + if (dmi_check_system(video_vendor_dmi_table)) { 2021 + acpi_video_unregister(); 2022 + } else { 2023 + interface->capability &= ~ACER_CAP_BRIGHTNESS; 2024 + pr_info("Brightness must be controlled by " 2025 + "acpi video driver\n"); 2026 + } 2042 2027 } 2043 2028 2044 2029 if (wmi_has_guid(WMID_GUID3)) {