aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi
diff options
context:
space:
mode:
authorVladimir Serbinenko <phcoder@gmail.com>2009-06-24 03:17:36 -0400
committerLen Brown <len.brown@intel.com>2009-08-29 17:41:31 -0400
commit4e231fa4cbd3ff53fcb7d76eccd6fd86a152a95f (patch)
tree0c24249ed36ecba14fc35fd59dbedb1199c165f8 /drivers/acpi
parent3b5e634103a5471d74e55d774e53db3df5c7b650 (diff)
ACPI video: ignore buggy _BQC
_BQC doesn't return a value listed in _BCL method. http://bugzilla.kernel.org/show_bug.cgi?id=13511 ingore the buggy _BQC method in this case Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Signed-off-by: Scott Howard <showard314@gmail.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/video.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index a0cd0c7ee9e2..2020907921cc 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -603,6 +603,7 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
603 unsigned long long *level) 603 unsigned long long *level)
604{ 604{
605 acpi_status status = AE_OK; 605 acpi_status status = AE_OK;
606 int i;
606 607
607 if (device->cap._BQC || device->cap._BCQ) { 608 if (device->cap._BQC || device->cap._BCQ) {
608 char *buf = device->cap._BQC ? "_BQC" : "_BCQ"; 609 char *buf = device->cap._BQC ? "_BQC" : "_BCQ";
@@ -618,8 +619,15 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
618 619
619 } 620 }
620 *level += bqc_offset_aml_bug_workaround; 621 *level += bqc_offset_aml_bug_workaround;
621 device->brightness->curr = *level; 622 for (i = 2; i < device->brightness->count; i++)
622 return 0; 623 if (device->brightness->levels[i] == *level) {
624 device->brightness->curr = *level;
625 return 0;
626 }
627 /* BQC returned an invalid level. Stop using it. */
628 ACPI_WARNING((AE_INFO, "%s returned an invalid level",
629 buf));
630 device->cap._BQC = device->cap._BCQ = 0;
623 } else { 631 } else {
624 /* Fixme: 632 /* Fixme:
625 * should we return an error or ignore this failure? 633 * should we return an error or ignore this failure?