Skip to contentSkip to conversation

acer-wmi: fix regression in backlight detection

PATCH In review [email protected] 3 participants 3 messages Mar 4, 2009 – Mar 17, 2009

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 acer-wmi: fix regression in backlight detection

From: Michael Spang <[email protected]>

Currently we disable the Acer WMI backlight device if there is no ACPI backlight device. As a result, we end up with no backlight device at all.
We should instead disable it if there is an ACPI device, as the other
laptop drivers do. This regression was introduced in febf2d9 ("Acer-WMI:
fingers off backlight if video.ko is serving this functionality").

Each laptop driver with backlight support got a similar change around febf2d9. The changes to the other drivers look correct; see e.g. a598c82f for a similar but correct change. The regression is also in 2.6.28.

Cc Thomas Renninger <[email protected]>
Cc Zhang Rui <[email protected]>
Cc Andi Kleen <[email protected]>
Cc Carlos Corbacho <[email protected]>
Cc Len Brown <[email protected]>
Cc "Rafael J. Wysocki" <[email protected]>
Cc <[email protected]> [2.6.28.x]

---

 drivers/platform/x86/acer-wmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/acer-wmi.c renamed from drivers/platform/x86/acer-wmi.c~acer-wmi-fix-regression-in-backlight-detection +1 -1
diff -puN drivers/platform/x86/acer-wmi.c~acer-wmi-fix-regression-in-backlight-detection drivers/platform/x86/acer-wmi.c
@@ -1297,7 +1297,7 @@ static int __init acer_wmi_init(void)
 
 	set_quirks();
 
-	if (!acpi_video_backlight_support() && has_cap(ACER_CAP_BRIGHTNESS)) {
+	if (acpi_video_backlight_support() && has_cap(ACER_CAP_BRIGHTNESS)) {
 		interface->capability &= ~ACER_CAP_BRIGHTNESS;
 		printk(ACER_INFO "Brightness must be controlled by "
 		       "generic video driver\n");

_

#1 lore raw

Hi,

Quoted 8 lines · On Wednesday 04 March 2009 21:07:34 [email protected] wrote:

From: Michael Spang <[email protected]>

Currently we disable the Acer WMI backlight device if there is no ACPI backlight device. As a result, we end up with no backlight device at all.
We should instead disable it if there is an ACPI device, as the other
laptop drivers do. This regression was introduced in febf2d9 ("Acer-WMI:
fingers off backlight if video.ko is serving this functionality").

Quoted 4 lines

Each laptop driver with backlight support got a similar change around febf2d9. The changes to the other drivers look correct; see e.g. a598c82f for a similar but correct change. The regression is also in 2.6.28.

Len, can you apply this one, please.

Quoted 2 lines
Cc Thomas Renninger <[email protected]>

No idea about stable policy, whether you have to wait for a mainline commit first or if you just push such typos. Here is the patch against 2.6.28, there the bug got introduced (file moved).

Thanks,

Thomas

---
 drivers/misc/acer-wmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/misc/acer-wmi.c +1 -1
Index: linux-2.6/drivers/misc/acer-wmi.c
===================================================================
@@ -1297,7 +1297,7 @@ static int __init acer_wmi_init(void)
 
 	set_quirks();
 
-	if (!acpi_video_backlight_support() && has_cap(ACER_CAP_BRIGHTNESS)) {
+	if (acpi_video_backlight_support() && has_cap(ACER_CAP_BRIGHTNESS)) {
 		interface->capability &= ~ACER_CAP_BRIGHTNESS;
 		printk(ACER_INFO "Brightness must be controlled by "
 		       "generic video driver\n");

reviewer
#2 lore raw

Linus checked this into 2.6.29
1ba869ec581fd9078b684c56c399ffe3d2345e27

and greg has it in his 2.6.28.stable queue,
so we're all set.

thanks,
Len Brown, Intel Open Source Technology Center

Quoted 47 lines · Thomas Renninger

Hi,

Quoted 8 lines · On Wednesday 04 March 2009 21:07:34 [email protected] wrote:

From: Michael Spang <[email protected]>

Currently we disable the Acer WMI backlight device if there is no ACPI backlight device. As a result, we end up with no backlight device at all.
We should instead disable it if there is an ACPI device, as the other
laptop drivers do. This regression was introduced in febf2d9 ("Acer-WMI:
fingers off backlight if video.ko is serving this functionality").

Quoted 4 lines

Each laptop driver with backlight support got a similar change around febf2d9. The changes to the other drivers look correct; see e.g. a598c82f for a similar but correct change. The regression is also in 2.6.28.

Len, can you apply this one, please.

Quoted 2 lines
Cc Thomas Renninger <[email protected]>

No idea about stable policy, whether you have to wait for a mainline commit first or if you just push such typos. Here is the patch against 2.6.28, there the bug got introduced (file moved).

Thanks,

Thomas

---
 drivers/misc/acer-wmi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/misc/acer-wmi.c
===================================================================

drivers/misc/acer-wmi.c +1 -1
@@ -1297,7 +1297,7 @@ static int __init acer_wmi_init(void)
 
 	set_quirks();
 
-	if (!acpi_video_backlight_support() && has_cap(ACER_CAP_BRIGHTNESS)) {
+	if (acpi_video_backlight_support() && has_cap(ACER_CAP_BRIGHTNESS)) {
 		interface->capability &= ~ACER_CAP_BRIGHTNESS;
 		printk(ACER_INFO "Brightness must be controlled by "
 		       "generic video driver\n");