aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/video.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-06-01 04:01:03 -0400
committerIngo Molnar <mingo@elte.hu>2009-06-01 04:01:39 -0400
commit23db9f430be9325a861c7762c1ffadad9ca528a8 (patch)
tree1ebb681611c96f17aa4f96e28d6923824a8b210f /drivers/acpi/video.c
parent27b9613b7be39412775d0ab80f57229aa73bb07d (diff)
parent3218911f839b6c85acbf872ad264ea69aa4d89ad (diff)
Merge branch 'linus' into perfcounters/core
Merge reason: merge almost-rc8 into perfcounters/core, which was -rc6 based - to pick up the latest upstream fixes. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/acpi/video.c')
-rw-r--r--drivers/acpi/video.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index d7ff61c0d571..810cca90ca7f 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -538,6 +538,41 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
538 return -EINVAL; 538 return -EINVAL;
539} 539}
540 540
541/*
542 * For some buggy _BQC methods, we need to add a constant value to
543 * the _BQC return value to get the actual current brightness level
544 */
545
546static int bqc_offset_aml_bug_workaround;
547static int __init video_set_bqc_offset(const struct dmi_system_id *d)
548{
549 bqc_offset_aml_bug_workaround = 9;
550 return 0;
551}
552
553static struct dmi_system_id video_dmi_table[] __initdata = {
554 /*
555 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
556 */
557 {
558 .callback = video_set_bqc_offset,
559 .ident = "Acer Aspire 5720",
560 .matches = {
561 DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
562 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5720"),
563 },
564 },
565 {
566 .callback = video_set_bqc_offset,
567 .ident = "Acer Aspire 5710Z",
568 .matches = {
569 DMI_MATCH(DMI_BOARD_VENDOR, "Acer"),
570 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 5710Z"),
571 },
572 },
573 {}
574};
575
541static int 576static int
542acpi_video_device_lcd_get_level_current(struct acpi_video_device *device, 577acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
543 unsigned long long *level) 578 unsigned long long *level)
@@ -557,6 +592,7 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
557 *level = device->brightness->levels[*level + 2]; 592 *level = device->brightness->levels[*level + 2];
558 593
559 } 594 }
595 *level += bqc_offset_aml_bug_workaround;
560 device->brightness->curr = *level; 596 device->brightness->curr = *level;
561 return 0; 597 return 0;
562 } else { 598 } else {
@@ -2290,6 +2326,8 @@ EXPORT_SYMBOL(acpi_video_register);
2290 2326
2291static int __init acpi_video_init(void) 2327static int __init acpi_video_init(void)
2292{ 2328{
2329 dmi_check_system(video_dmi_table);
2330
2293 if (intel_opregion_present()) 2331 if (intel_opregion_present())
2294 return 0; 2332 return 0;
2295 2333