diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/video.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index 1f1625c51003..9730ec167590 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
@@ -162,6 +162,7 @@ struct acpi_video_device_cap { | |||
162 | u8 _BCL:1; /*Query list of brightness control levels supported */ | 162 | u8 _BCL:1; /*Query list of brightness control levels supported */ |
163 | u8 _BCM:1; /*Set the brightness level */ | 163 | u8 _BCM:1; /*Set the brightness level */ |
164 | u8 _BQC:1; /* Get current brightness level */ | 164 | u8 _BQC:1; /* Get current brightness level */ |
165 | u8 _BCQ:1; /* Some buggy BIOS uses _BCQ instead of _BQC */ | ||
165 | u8 _DDC:1; /*Return the EDID for this device */ | 166 | u8 _DDC:1; /*Return the EDID for this device */ |
166 | u8 _DCS:1; /*Return status of output device */ | 167 | u8 _DCS:1; /*Return status of output device */ |
167 | u8 _DGS:1; /*Query graphics state */ | 168 | u8 _DGS:1; /*Query graphics state */ |
@@ -523,8 +524,10 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, | |||
523 | { | 524 | { |
524 | acpi_status status = AE_OK; | 525 | acpi_status status = AE_OK; |
525 | 526 | ||
526 | if (device->cap._BQC) { | 527 | if (device->cap._BQC || device->cap._BCQ) { |
527 | status = acpi_evaluate_integer(device->dev->handle, "_BQC", | 528 | char *buf = device->cap._BQC ? "_BQC" : "_BCQ"; |
529 | |||
530 | status = acpi_evaluate_integer(device->dev->handle, buf, | ||
528 | NULL, level); | 531 | NULL, level); |
529 | if (ACPI_SUCCESS(status)) { | 532 | if (ACPI_SUCCESS(status)) { |
530 | if (device->brightness->flags._BQC_use_index) { | 533 | if (device->brightness->flags._BQC_use_index) { |
@@ -544,8 +547,8 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, | |||
544 | * ACPI video backlight still works w/ buggy _BQC. | 547 | * ACPI video backlight still works w/ buggy _BQC. |
545 | * http://bugzilla.kernel.org/show_bug.cgi?id=12233 | 548 | * http://bugzilla.kernel.org/show_bug.cgi?id=12233 |
546 | */ | 549 | */ |
547 | ACPI_WARNING((AE_INFO, "Evaluating _BQC failed")); | 550 | ACPI_WARNING((AE_INFO, "Evaluating %s failed", buf)); |
548 | device->cap._BQC = 0; | 551 | device->cap._BQC = device->cap._BCQ = 0; |
549 | } | 552 | } |
550 | } | 553 | } |
551 | 554 | ||
@@ -861,6 +864,12 @@ static void acpi_video_device_find_cap(struct acpi_video_device *device) | |||
861 | } | 864 | } |
862 | if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle,"_BQC",&h_dummy1))) | 865 | if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle,"_BQC",&h_dummy1))) |
863 | device->cap._BQC = 1; | 866 | device->cap._BQC = 1; |
867 | else if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_BCQ", | ||
868 | &h_dummy1))) { | ||
869 | printk(KERN_WARNING FW_BUG "_BCQ is used instead of _BQC\n"); | ||
870 | device->cap._BCQ = 1; | ||
871 | } | ||
872 | |||
864 | if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DDC", &h_dummy1))) { | 873 | if (ACPI_SUCCESS(acpi_get_handle(device->dev->handle, "_DDC", &h_dummy1))) { |
865 | device->cap._DDC = 1; | 874 | device->cap._DDC = 1; |
866 | } | 875 | } |