linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Aaron Lu <aaron.lu@intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: ACPI Devel Mailing List <linux-acpi@vger.kernel.org>,
	Qingshuai Tian <qingshuai.tian@intel.com>,
	erno@iki.fi, Kirill Tkhai <tkhai@yandex.ru>,
	Shuduo Sang <sangshuduo@gmail.com>
Subject: [PATCH 2/2] ACPI / video: Quirk initial backlight level 0
Date: Wed, 06 Nov 2013 09:07:10 +0800	[thread overview]
Message-ID: <5279963E.8030109@intel.com> (raw)
In-Reply-To: <52799553.7020406@intel.com>

Some firmware doesn't initialize initial backlight level to a proper
value and _BQC will return 0 on first time evaluation. We used to be
able to detect such incorrect value with our code logic, as value 0
normally isn't a valid value in _BCL. But with the introduction of Win8,
firmware begins to fill _BCL with values from 0 to 100, now 0 becomes
a valid value but that value will make user's screen black. This patch
test initial _BQC for value 0, if such a value is returned, do not use
it.

Reference: https://bugzilla.kernel.org/show_bug.cgi?id=64031
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=61231
Reference: https://bugzilla.kernel.org/show_bug.cgi?id=63111
Reported-by: Qingshuai Tian <qingshuai.tian@intel.com>
Tested-by: Aaron Lu <aaron.lu@intel.com> on "Idealpad u330p"
Reported-and-tested-by: <erno@iki.fi> on "Acer Aspire V5-573G"
Reported-and-tested-by: Kirill Tkhai <tkhai@yandex.ru> on "HP 250 G1"
Signed-off-by: Aaron Lu <aaron.lu@intel.com>
Cc: stable <stable@vger.kernel.org>
---
 drivers/acpi/video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index bf521b36c2f9..a049fa9360d0 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -858,7 +858,7 @@ acpi_video_init_brightness(struct acpi_video_device *device)
 		for (i = 2; i < br->count; i++)
 			if (level == br->levels[i])
 				break;
-		if (i == br->count)
+		if (i == br->count || !level)
 			level = max_level;
 	}
 
-- 
1.8.4.39.ga0d3f10

  reply	other threads:[~2013-11-06  1:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06  1:03 [PATCH 1/2] ACPI / video: Fix initial level validity test Aaron Lu
2013-11-06  1:07 ` Aaron Lu [this message]
2013-11-06  1:18   ` [PATCH 2/2] ACPI / video: Quirk initial backlight level 0 Aaron Lu
2013-11-06 22:04   ` Rafael J. Wysocki
2013-11-07  0:26     ` Aaron Lu
2013-11-06 22:03 ` [PATCH 1/2] ACPI / video: Fix initial level validity test Rafael J. Wysocki
2013-11-07  0:25   ` Aaron Lu

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=5279963E.8030109@intel.com \
    --to=aaron.lu@intel.com \
    --cc=erno@iki.fi \
    --cc=linux-acpi@vger.kernel.org \
    --cc=qingshuai.tian@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=sangshuduo@gmail.com \
    --cc=tkhai@yandex.ru \
    /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;
as well as URLs for NNTP newsgroup(s).