* [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic
@ 2014-08-28 8:20 Hans de Goede
2014-08-28 8:20 ` [PATCH 2/4] acpi-video: Add a disable_native_backlight quirk Hans de Goede
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Hans de Goede @ 2014-08-28 8:20 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Aaron Lu, Zhang Rui, Len Brown, Andre Müller, Hohahiu,
linux-acpi, Hans de Goede, stable
Commit 751109aad583 ("ACPI / video: Change the default for
video.use_native_backlight to 1") has changed the default for
use_native_backlight from 0 to 1, but instead of changing
use_native_backlight_dmi to true, and leaving use_native_backlight_param at -1,
it has changed use_native_backlight_param to 1.
This causes acpi_video_use_native_backlight() to always think that a value was
specified through the param, making it impossible to add a dmi based quirk
to force 0 now that the default is 1.
This fixes this by restoring the use_native_backlight_param default to -1, and
instead setting the use_native_backlight_dmi default to true.
Cc: stable@vger.kernel.org # 3.16
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
drivers/acpi/video.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 8268843..58bcf7a 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -82,9 +82,9 @@ module_param(allow_duplicates, bool, 0644);
* For Windows 8 systems: used to decide if video module
* should skip registering backlight interface of its own.
*/
-static int use_native_backlight_param = 1;
+static int use_native_backlight_param = -1;
module_param_named(use_native_backlight, use_native_backlight_param, int, 0444);
-static bool use_native_backlight_dmi = false;
+static bool use_native_backlight_dmi = true;
static int register_count;
static struct mutex video_list_lock;
--
2.1.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH 2/4] acpi-video: Add a disable_native_backlight quirk 2014-08-28 8:20 [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic Hans de Goede @ 2014-08-28 8:20 ` Hans de Goede 2014-08-28 8:20 ` [PATCH 3/4] acpi-video: Disable native_backlight on HP ENVY 15 Notebook PC Hans de Goede ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: Hans de Goede @ 2014-08-28 8:20 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Aaron Lu, Zhang Rui, Len Brown, Andre Müller, Hohahiu, linux-acpi, Hans de Goede, stable Some laptops have a working acpi_video backlight control, and using native backlight on these causes a regression where backlight control does not work when userspace is not handling brightness key events. Disable native_backlight on these to fix this. https://bugzilla.kernel.org/show_bug.cgi?id=81691 Reported-and-tested-by: Andre Müller <andre.muller@web.de> Cc: stable@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/acpi/video.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 58bcf7a..dd5c302 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -417,6 +417,12 @@ static int __init video_set_use_native_backlight(const struct dmi_system_id *d) return 0; } +static int __init video_disable_native_backlight(const struct dmi_system_id *d) +{ + use_native_backlight_dmi = false; + return 0; +} + static struct dmi_system_id video_dmi_table[] __initdata = { /* * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 @@ -720,6 +726,30 @@ static struct dmi_system_id video_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8780w"), }, }, + + /* + * These models have a working acpi_video backlight control, and using + * native backlight causes a regression where backlight does not work + * when userspace is not handling brightness key events. Disable + * native_backlight on these to fix this: + * https://bugzilla.kernel.org/show_bug.cgi?id=81691 + */ + { + .callback = video_disable_native_backlight, + .ident = "ThinkPad T420", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T420"), + }, + }, + { + .callback = video_disable_native_backlight, + .ident = "ThinkPad T520", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T520"), + }, + }, {} }; -- 2.1.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 3/4] acpi-video: Disable native_backlight on HP ENVY 15 Notebook PC 2014-08-28 8:20 [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic Hans de Goede 2014-08-28 8:20 ` [PATCH 2/4] acpi-video: Add a disable_native_backlight quirk Hans de Goede @ 2014-08-28 8:20 ` Hans de Goede 2014-08-28 8:20 ` [PATCH 4/4] acpi-video: Remove video_set_use_native_backlight quirk Hans de Goede 2014-09-02 21:53 ` [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic Rafael J. Wysocki 3 siblings, 0 replies; 5+ messages in thread From: Hans de Goede @ 2014-08-28 8:20 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Aaron Lu, Zhang Rui, Len Brown, Andre Müller, Hohahiu, linux-acpi, Hans de Goede, stable https://bugs.freedesktop.org/show_bug.cgi?id=81515 Reported-and-tested-by: Hohahiu <rakothedin@gmail.com> Cc: stable@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/acpi/video.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index dd5c302..fcbda10 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -750,6 +750,17 @@ static struct dmi_system_id video_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T520"), }, }, + + /* The native backlight controls do not work on some older machines */ + { + /* https://bugs.freedesktop.org/show_bug.cgi?id=81515 */ + .callback = video_disable_native_backlight, + .ident = "HP ENVY 15 Notebook", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP ENVY 15 Notebook PC"), + }, + }, {} }; -- 2.1.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 4/4] acpi-video: Remove video_set_use_native_backlight quirk 2014-08-28 8:20 [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic Hans de Goede 2014-08-28 8:20 ` [PATCH 2/4] acpi-video: Add a disable_native_backlight quirk Hans de Goede 2014-08-28 8:20 ` [PATCH 3/4] acpi-video: Disable native_backlight on HP ENVY 15 Notebook PC Hans de Goede @ 2014-08-28 8:20 ` Hans de Goede 2014-09-02 21:53 ` [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic Rafael J. Wysocki 3 siblings, 0 replies; 5+ messages in thread From: Hans de Goede @ 2014-08-28 8:20 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Aaron Lu, Zhang Rui, Len Brown, Andre Müller, Hohahiu, linux-acpi, Hans de Goede use_native_backlight_dmi defaults to true now, so it is a nop. Signed-off-by: Hans de Goede <hdegoede@redhat.com> --- drivers/acpi/video.c | 265 --------------------------------------------------- 1 file changed, 265 deletions(-) diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index fcbda10..5a98e1d 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c @@ -411,12 +411,6 @@ static int __init video_set_bqc_offset(const struct dmi_system_id *d) return 0; } -static int __init video_set_use_native_backlight(const struct dmi_system_id *d) -{ - use_native_backlight_dmi = true; - return 0; -} - static int __init video_disable_native_backlight(const struct dmi_system_id *d) { use_native_backlight_dmi = false; @@ -467,265 +461,6 @@ static struct dmi_system_id video_dmi_table[] __initdata = { DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"), }, }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad X230", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X230"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad T430 and T430s", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad T430"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad T430", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "2349D15"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad T431s", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "20AACTO1WW"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad Edge E530", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "3259A2G"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad Edge E530", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "3259CTO"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad Edge E530", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "3259HJG"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad W530", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad W530"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ThinkPad X1 Carbon", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad X1 Carbon"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Lenovo Yoga 13", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo IdeaPad Yoga 13"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Lenovo Yoga 2 11", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Yoga 2 11"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Thinkpad Helix", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), - DMI_MATCH(DMI_PRODUCT_VERSION, "ThinkPad Helix"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Dell Inspiron 7520", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), - DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 7520"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Acer Aspire 5733Z", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5733Z"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Acer Aspire 5742G", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5742G"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Acer Aspire V5-171", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "V5-171"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Acer Aspire V5-431", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "Aspire V5-431"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Acer Aspire V5-471G", - .matches = { - DMI_MATCH(DMI_BOARD_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "Aspire V5-471G"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Acer TravelMate B113", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer"), - DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate B113"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Acer Aspire V5-572G", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer Aspire"), - DMI_MATCH(DMI_PRODUCT_VERSION, "V5-572G/Dazzle_CX"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "Acer Aspire V5-573G", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Acer Aspire"), - DMI_MATCH(DMI_PRODUCT_VERSION, "V5-573G/Dazzle_HW"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "ASUS Zenbook Prime UX31A", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), - DMI_MATCH(DMI_PRODUCT_NAME, "UX31A"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP ProBook 4340s", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_VERSION, "HP ProBook 4340s"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP ProBook 4540s", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_VERSION, "HP ProBook 4540s"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP ProBook 2013 models", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP ProBook "), - DMI_MATCH(DMI_PRODUCT_NAME, " G1"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP EliteBook 2013 models", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook "), - DMI_MATCH(DMI_PRODUCT_NAME, " G1"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP EliteBook 2014 models", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook "), - DMI_MATCH(DMI_PRODUCT_NAME, " G2"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP ZBook 14", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 14"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP ZBook 15", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 15"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP ZBook 17", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP ZBook 17"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP EliteBook 8470p", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8470p"), - }, - }, - { - .callback = video_set_use_native_backlight, - .ident = "HP EliteBook 8780w", - .matches = { - DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), - DMI_MATCH(DMI_PRODUCT_NAME, "HP EliteBook 8780w"), - }, - }, /* * These models have a working acpi_video backlight control, and using -- 2.1.0 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic 2014-08-28 8:20 [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic Hans de Goede ` (2 preceding siblings ...) 2014-08-28 8:20 ` [PATCH 4/4] acpi-video: Remove video_set_use_native_backlight quirk Hans de Goede @ 2014-09-02 21:53 ` Rafael J. Wysocki 3 siblings, 0 replies; 5+ messages in thread From: Rafael J. Wysocki @ 2014-09-02 21:53 UTC (permalink / raw) To: Hans de Goede Cc: Aaron Lu, Zhang Rui, Len Brown, Andre Müller, Hohahiu, linux-acpi, stable On Thursday, August 28, 2014 10:20:45 AM Hans de Goede wrote: > Commit 751109aad583 ("ACPI / video: Change the default for > video.use_native_backlight to 1") has changed the default for > use_native_backlight from 0 to 1, but instead of changing > use_native_backlight_dmi to true, and leaving use_native_backlight_param at -1, > it has changed use_native_backlight_param to 1. > > This causes acpi_video_use_native_backlight() to always think that a value was > specified through the param, making it impossible to add a dmi based quirk > to force 0 now that the default is 1. > > This fixes this by restoring the use_native_backlight_param default to -1, and > instead setting the use_native_backlight_dmi default to true. > > Cc: stable@vger.kernel.org # 3.16 > Signed-off-by: Hans de Goede <hdegoede@redhat.com> Patches [1-3/4] queued up for 3.17-rc4. I'll queue up the last one for 3.18 later. Thanks! > --- > drivers/acpi/video.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c > index 8268843..58bcf7a 100644 > --- a/drivers/acpi/video.c > +++ b/drivers/acpi/video.c > @@ -82,9 +82,9 @@ module_param(allow_duplicates, bool, 0644); > * For Windows 8 systems: used to decide if video module > * should skip registering backlight interface of its own. > */ > -static int use_native_backlight_param = 1; > +static int use_native_backlight_param = -1; > module_param_named(use_native_backlight, use_native_backlight_param, int, 0444); > -static bool use_native_backlight_dmi = false; > +static bool use_native_backlight_dmi = true; > > static int register_count; > static struct mutex video_list_lock; > -- I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-09-02 21:34 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-08-28 8:20 [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic Hans de Goede 2014-08-28 8:20 ` [PATCH 2/4] acpi-video: Add a disable_native_backlight quirk Hans de Goede 2014-08-28 8:20 ` [PATCH 3/4] acpi-video: Disable native_backlight on HP ENVY 15 Notebook PC Hans de Goede 2014-08-28 8:20 ` [PATCH 4/4] acpi-video: Remove video_set_use_native_backlight quirk Hans de Goede 2014-09-02 21:53 ` [PATCH 1/4] acpi-video: Fix use_native_backlight selection logic Rafael J. Wysocki
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox