aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-01-09 09:10:01 -0500
committerDarren Hart <dvhart@linux.intel.com>2015-01-23 12:09:04 -0500
commit4690555e13c48fef07f2762f6b0cd6b181e326d0 (patch)
tree47320e44e37b1857717d6958ed9d6c1b950b426e /drivers/platform/x86
parent172ce0a9f6bf4460fae74026014650cc4a90d37c (diff)
samsung-laptop: Add use_native_backlight quirk, and enable it on some models
Since kernel 3.14 the backlight control has been broken on various Samsung Atom based netbooks. This has been bisected and this problem happens since commit b35684b8fa94 ("drm/i915: do full backlight setup at enable time") This has been reported and discussed in detail here: http://lists.freedesktop.org/archives/intel-gfx/2014-July/049395.html Unfortunately no-one has been able to fix this. This only affects Samsung Atom netbooks, and the Linux kernel and the BIOS of those laptops have never worked well together. All affected laptops already have a quirk to avoid using the standard acpi-video interface and instead use the samsung specific SABI interface which samsung-laptop uses. It seems that recent fixes to the i915 driver have also broken backlight control through the SABI interface. The intel_backlight driver OTOH works fine, and also allows for finer grained backlight control. So add a new use_native_backlight quirk, and replace the broken_acpi_video quirk with this quirk for affected models. This new quirk disables acpi-video as before and also stops samsung-laptop from registering the SABI based samsung_laptop backlight interface, leaving only the working intel_backlight interface. This commit enables this new quirk for 3 models which are known to be affected, chances are that it needs to be used on other models too. BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1094948 # N145P BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1115713 # N250P Reported-by: Bertrik Sikken <bertrik@sikken.nl> # N150P Cc: stable@vger.kernel.org # 3.16 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/samsung-laptop.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c
index ff765d8e1a09..ce364a41842a 100644
--- a/drivers/platform/x86/samsung-laptop.c
+++ b/drivers/platform/x86/samsung-laptop.c
@@ -353,6 +353,7 @@ struct samsung_quirks {
353 bool broken_acpi_video; 353 bool broken_acpi_video;
354 bool four_kbd_backlight_levels; 354 bool four_kbd_backlight_levels;
355 bool enable_kbd_backlight; 355 bool enable_kbd_backlight;
356 bool use_native_backlight;
356}; 357};
357 358
358static struct samsung_quirks samsung_unknown = {}; 359static struct samsung_quirks samsung_unknown = {};
@@ -361,6 +362,10 @@ static struct samsung_quirks samsung_broken_acpi_video = {
361 .broken_acpi_video = true, 362 .broken_acpi_video = true,
362}; 363};
363 364
365static struct samsung_quirks samsung_use_native_backlight = {
366 .use_native_backlight = true,
367};
368
364static struct samsung_quirks samsung_np740u3e = { 369static struct samsung_quirks samsung_np740u3e = {
365 .four_kbd_backlight_levels = true, 370 .four_kbd_backlight_levels = true,
366 .enable_kbd_backlight = true, 371 .enable_kbd_backlight = true,
@@ -1507,7 +1512,7 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
1507 DMI_MATCH(DMI_PRODUCT_NAME, "N150P"), 1512 DMI_MATCH(DMI_PRODUCT_NAME, "N150P"),
1508 DMI_MATCH(DMI_BOARD_NAME, "N150P"), 1513 DMI_MATCH(DMI_BOARD_NAME, "N150P"),
1509 }, 1514 },
1510 .driver_data = &samsung_broken_acpi_video, 1515 .driver_data = &samsung_use_native_backlight,
1511 }, 1516 },
1512 { 1517 {
1513 .callback = samsung_dmi_matched, 1518 .callback = samsung_dmi_matched,
@@ -1517,7 +1522,7 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
1517 DMI_MATCH(DMI_PRODUCT_NAME, "N145P/N250P/N260P"), 1522 DMI_MATCH(DMI_PRODUCT_NAME, "N145P/N250P/N260P"),
1518 DMI_MATCH(DMI_BOARD_NAME, "N145P/N250P/N260P"), 1523 DMI_MATCH(DMI_BOARD_NAME, "N145P/N250P/N260P"),
1519 }, 1524 },
1520 .driver_data = &samsung_broken_acpi_video, 1525 .driver_data = &samsung_use_native_backlight,
1521 }, 1526 },
1522 { 1527 {
1523 .callback = samsung_dmi_matched, 1528 .callback = samsung_dmi_matched,
@@ -1557,7 +1562,7 @@ static struct dmi_system_id __initdata samsung_dmi_table[] = {
1557 DMI_MATCH(DMI_PRODUCT_NAME, "N250P"), 1562 DMI_MATCH(DMI_PRODUCT_NAME, "N250P"),
1558 DMI_MATCH(DMI_BOARD_NAME, "N250P"), 1563 DMI_MATCH(DMI_BOARD_NAME, "N250P"),
1559 }, 1564 },
1560 .driver_data = &samsung_broken_acpi_video, 1565 .driver_data = &samsung_use_native_backlight,
1561 }, 1566 },
1562 { 1567 {
1563 .callback = samsung_dmi_matched, 1568 .callback = samsung_dmi_matched,
@@ -1616,6 +1621,15 @@ static int __init samsung_init(void)
1616 pr_info("Disabling ACPI video driver\n"); 1621 pr_info("Disabling ACPI video driver\n");
1617 acpi_video_unregister(); 1622 acpi_video_unregister();
1618 } 1623 }
1624
1625 if (samsung->quirks->use_native_backlight) {
1626 pr_info("Using native backlight driver\n");
1627 /* Tell acpi-video to not handle the backlight */
1628 acpi_video_dmi_promote_vendor();
1629 acpi_video_unregister();
1630 /* And also do not handle it ourselves */
1631 samsung->handle_backlight = false;
1632 }
1619#endif 1633#endif
1620 1634
1621 ret = samsung_platform_init(samsung); 1635 ret = samsung_platform_init(samsung);