public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] acpi/video: Don't restore backlight to 0 at boot time
@ 2011-12-31  8:52 Keith Packard
  2012-01-03 22:19 ` Matthew Garrett
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Packard @ 2011-12-31  8:52 UTC (permalink / raw)
  To: linux-kernel; +Cc: Keith Packard, Bdale Garbee, Matthew Garrett

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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] acpi/video: Don't restore backlight to 0 at boot time
  2011-12-31  8:52 [PATCH] acpi/video: Don't restore backlight to 0 at boot time Keith Packard
@ 2012-01-03 22:19 ` Matthew Garrett
  2012-05-24  7:13   ` Keith Packard
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Garrett @ 2012-01-03 22:19 UTC (permalink / raw)
  To: Keith Packard; +Cc: linux-kernel, Bdale Garbee

ACPI arguably does define 0 as being off (this is exceedingly poorly 
defined), but I'm not entirely happy with this - the firmware makes its 
behaviour conditional on the OS version. I'd really like to see an 
updated version of the Intel opregion spec to get a better idea of what 
we're meant to be doing here, but the last one made public was ancient.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] acpi/video: Don't restore backlight to 0 at boot time
  2012-01-03 22:19 ` Matthew Garrett
@ 2012-05-24  7:13   ` Keith Packard
  2012-05-24 13:24     ` Matthew Garrett
  0 siblings, 1 reply; 4+ messages in thread
From: Keith Packard @ 2012-05-24  7:13 UTC (permalink / raw)
  To: Matthew Garrett; +Cc: linux-kernel, Bdale Garbee

[-- Attachment #1: Type: text/plain, Size: 563 bytes --]

Matthew Garrett <mjg59@srcf.ucam.org> writes:

> ACPI arguably does define 0 as being off (this is exceedingly poorly 
> defined), but I'm not entirely happy with this - the firmware makes its 
> behaviour conditional on the OS version. I'd really like to see an 
> updated version of the Intel opregion spec to get a better idea of what 
> we're meant to be doing here, but the last one made public was
> ancient.

Kernel 3.4 continues to break on this machine; I'd love to know how to
get a suitable fix upstreamed...

-- 
keith.packard@intel.com

[-- Attachment #2: Type: application/pgp-signature, Size: 827 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] acpi/video: Don't restore backlight to 0 at boot time
  2012-05-24  7:13   ` Keith Packard
@ 2012-05-24 13:24     ` Matthew Garrett
  0 siblings, 0 replies; 4+ messages in thread
From: Matthew Garrett @ 2012-05-24 13:24 UTC (permalink / raw)
  To: Keith Packard; +Cc: linux-kernel, Bdale Garbee

On Thu, May 24, 2012 at 12:13:40AM -0700, Keith Packard wrote:
> Matthew Garrett <mjg59@srcf.ucam.org> writes:
> 
> > ACPI arguably does define 0 as being off (this is exceedingly poorly 
> > defined), but I'm not entirely happy with this - the firmware makes its 
> > behaviour conditional on the OS version. I'd really like to see an 
> > updated version of the Intel opregion spec to get a better idea of what 
> > we're meant to be doing here, but the last one made public was
> > ancient.
> 
> Kernel 3.4 continues to break on this machine; I'd love to know how to
> get a suitable fix upstreamed...


Still waiting for that spec.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-24 13:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-31  8:52 [PATCH] acpi/video: Don't restore backlight to 0 at boot time Keith Packard
2012-01-03 22:19 ` Matthew Garrett
2012-05-24  7:13   ` Keith Packard
2012-05-24 13:24     ` Matthew Garrett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox