From: Keith Packard <keithp@keithp.com>
To: linux-kernel@vger.kernel.org
Cc: Keith Packard <keithp@keithp.com>, Bdale Garbee <bdale@gag.com>,
Matthew Garrett <mjg@redhat.com>
Subject: [PATCH] acpi/video: Don't restore backlight to 0 at boot time
Date: Sat, 31 Dec 2011 00:52:27 -0800 [thread overview]
Message-ID: <1325321547-20637-1-git-send-email-keithp@keithp.com> (raw)
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
next reply other threads:[~2011-12-31 8:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-31 8:52 Keith Packard [this message]
2012-01-03 22:19 ` Matthew Garrett
2012-05-24 7:13 ` Keith Packard
2012-05-24 13:24 ` Matthew Garrett
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1325321547-20637-1-git-send-email-keithp@keithp.com \
--to=keithp@keithp.com \
--cc=bdale@gag.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mjg@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®