aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Lu <aaron.lu@intel.com>2013-11-15 01:39:12 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-11-15 17:23:17 -0500
commit545ef368e08fda654b6e63ce522c66339aa29156 (patch)
tree8846d4f03372f879a0d744601b1dbd514ba19707
parent2f466d33f5f60542d3d82c0477de5863b22c94b9 (diff)
ACPI / video: clean up DMI table for initial black screen problem
With commit 2c62333a408f "ACPI / video: Quirk initial backlight level 0" we do not need to have the following systems in DMI table, so remove them. HP Pavilion m4, HP 1000 Notebook PC, HP Pavilion g6 Notebook PC, HP Pavilion dm4, Fujitsu E753, HP Folio 13-2000. With this change, the use_bios_initial_backlight module parameter is no longer needed and thus removed. Signed-off-by: Aaron Lu <aaron.lu@intel.com> Tested-by: Alex Hung <alex.hung@canonical.com> # for HP 1000 Notebook PC Tested-by: Gustavo Maciel Dias Vieira <gustavo@sagui.org> # for HP Pavilion dm4 Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/video.c87
1 files changed, 12 insertions, 75 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
index 18dbdff4656e..995e91bcb97b 100644
--- a/drivers/acpi/video.c
+++ b/drivers/acpi/video.c
@@ -82,13 +82,6 @@ static bool allow_duplicates;
82module_param(allow_duplicates, bool, 0644); 82module_param(allow_duplicates, bool, 0644);
83 83
84/* 84/*
85 * Some BIOSes claim they use minimum backlight at boot,
86 * and this may bring dimming screen after boot
87 */
88static bool use_bios_initial_backlight = 1;
89module_param(use_bios_initial_backlight, bool, 0644);
90
91/*
92 * For Windows 8 systems: if set ture and the GPU driver has 85 * For Windows 8 systems: if set ture and the GPU driver has
93 * registered a backlight interface, skip registering ACPI video's. 86 * registered a backlight interface, skip registering ACPI video's.
94 */ 87 */
@@ -406,12 +399,6 @@ static int __init video_set_bqc_offset(const struct dmi_system_id *d)
406 return 0; 399 return 0;
407} 400}
408 401
409static int video_ignore_initial_backlight(const struct dmi_system_id *d)
410{
411 use_bios_initial_backlight = 0;
412 return 0;
413}
414
415static struct dmi_system_id video_dmi_table[] __initdata = { 402static struct dmi_system_id video_dmi_table[] __initdata = {
416 /* 403 /*
417 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 404 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
@@ -456,54 +443,6 @@ static struct dmi_system_id video_dmi_table[] __initdata = {
456 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"), 443 DMI_MATCH(DMI_PRODUCT_NAME, "Aspire 7720"),
457 }, 444 },
458 }, 445 },
459 {
460 .callback = video_ignore_initial_backlight,
461 .ident = "HP Folio 13-2000",
462 .matches = {
463 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
464 DMI_MATCH(DMI_PRODUCT_NAME, "HP Folio 13 - 2000 Notebook PC"),
465 },
466 },
467 {
468 .callback = video_ignore_initial_backlight,
469 .ident = "Fujitsu E753",
470 .matches = {
471 DMI_MATCH(DMI_BOARD_VENDOR, "FUJITSU"),
472 DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK E753"),
473 },
474 },
475 {
476 .callback = video_ignore_initial_backlight,
477 .ident = "HP Pavilion dm4",
478 .matches = {
479 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
480 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dm4 Notebook PC"),
481 },
482 },
483 {
484 .callback = video_ignore_initial_backlight,
485 .ident = "HP Pavilion g6 Notebook PC",
486 .matches = {
487 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
488 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion g6 Notebook PC"),
489 },
490 },
491 {
492 .callback = video_ignore_initial_backlight,
493 .ident = "HP 1000 Notebook PC",
494 .matches = {
495 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
496 DMI_MATCH(DMI_PRODUCT_NAME, "HP 1000 Notebook PC"),
497 },
498 },
499 {
500 .callback = video_ignore_initial_backlight,
501 .ident = "HP Pavilion m4",
502 .matches = {
503 DMI_MATCH(DMI_BOARD_VENDOR, "Hewlett-Packard"),
504 DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion m4 Notebook PC"),
505 },
506 },
507 {} 446 {}
508}; 447};
509 448
@@ -839,20 +778,18 @@ acpi_video_init_brightness(struct acpi_video_device *device)
839 if (!device->cap._BQC) 778 if (!device->cap._BQC)
840 goto set_level; 779 goto set_level;
841 780
842 if (use_bios_initial_backlight) { 781 level = acpi_video_bqc_value_to_level(device, level_old);
843 level = acpi_video_bqc_value_to_level(device, level_old); 782 /*
844 /* 783 * On some buggy laptops, _BQC returns an uninitialized
845 * On some buggy laptops, _BQC returns an uninitialized 784 * value when invoked for the first time, i.e.
846 * value when invoked for the first time, i.e. 785 * level_old is invalid (no matter whether it's a level
847 * level_old is invalid (no matter whether it's a level 786 * or an index). Set the backlight to max_level in this case.
848 * or an index). Set the backlight to max_level in this case. 787 */
849 */ 788 for (i = 2; i < br->count; i++)
850 for (i = 2; i < br->count; i++) 789 if (level == br->levels[i])
851 if (level == br->levels[i]) 790 break;
852 break; 791 if (i == br->count || !level)
853 if (i == br->count || !level) 792 level = max_level;
854 level = max_level;
855 }
856 793
857set_level: 794set_level:
858 result = acpi_video_device_lcd_set_level(device, level); 795 result = acpi_video_device_lcd_set_level(device, level);