lkml.org 
[lkml]   [2011]   [Dec]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] acpi/video: Don't restore backlight to 0 at boot time
Date
If the initial ACPI reported backlight level is zero, or larger than
max_level, then ignore it and set the level back to the current level
instead. This avoids ending up with a black screen on an HP Pavilion
G series G4 notebook QE040UA#ABA.

Reported-by: Bdale Garbee <bdale@gag.com>
Cc: Bdale Garbee <bdale@gag.com>
Cc: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
---
drivers/acpi/video.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 08a44b5..688f342 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -711,7 +711,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
* when invoked for the first time, i.e. level_old is invalid.
* set the backlight to max_level in this case
*/
- if (use_bios_initial_backlight) {
+ if (use_bios_initial_backlight && 0 < level_old && level_old <= max_level) {
for (i = 2; i < br->count; i++)
if (level_old == br->levels[i])
level = level_old;
--
1.7.7.3


\
 
 \ /
  Last update: 2011-12-31 09:53    [W:1.214 / U:0.872 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site