lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 31 Dec 2011 00:52:27 -0800
From:	Keith Packard <keithp@...thp.com>
To:	linux-kernel@...r.kernel.org
Cc:	Keith Packard <keithp@...thp.com>, Bdale Garbee <bdale@....com>,
	Matthew Garrett <mjg@...hat.com>
Subject: [PATCH] acpi/video: Don't restore backlight to 0 at boot time

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@....com>
Cc: Bdale Garbee <bdale@....com>
Cc: Matthew Garrett <mjg@...hat.com>
Signed-off-by: Keith Packard <keithp@...thp.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

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ