Fix for the keyboard backlight on Dell XPS 13 9370

This commit is contained in:
Jeremy Cline 2018-06-11 19:59:27 -04:00
parent 088f35853b
commit 349bbc6126
No known key found for this signature in database
GPG Key ID: 9223308FA9B246DB
2 changed files with 82 additions and 0 deletions

View File

@ -671,6 +671,9 @@ Patch514: libata-Drop-SanDisk-SD7UB3Q-G1001-NOLPM-quirk.patch
# CVE-2018-10853 rhbz 1589890 1589892
Patch515: kvm-x86-Check-CPL-in-segmented_write_std.patch
# https://www.spinics.net/lists/platform-driver-x86/msg15719.html
Patch516: platform-x86-dell-laptop-Fix-keyboard-backlight-time.patch
# END OF PATCH DEFINITIONS
%endif
@ -1921,6 +1924,9 @@ fi
#
#
%changelog
* Mon Jun 11 2018 Jeremy Cline <jeremy@jcline.org>
- Fix for the keyboard backlight on Dell XPS 13 9370
* Mon Jun 11 2018 Justin M. Forbes <jforbes@fedoraproject.org>
- Fix CVE-2018-10853 (rhbz 1589890 1589892)

View File

@ -0,0 +1,76 @@
From e6a7379fcb5702da681d7da8e9d9a2a26cc6fa85 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timur=20Krist=C3=B3f?= <timur.kristof@gmail.com>
Date: Fri, 1 Jun 2018 12:32:56 +0200
Subject: [PATCH] platform/x86: dell-laptop: Fix keyboard backlight timeout on
XPS 13 9370
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The XPS 13 9370 doesn't expose the necessary KBD_LED_AC_TOKEN in
the BIOS, so the driver thinks it cannot adjust the AC keyboard
backlight timeout. This patch adds a quirk to fix this until
Dell adds the missing token to the BIOS.
For further discussion, see:
https://github.com/dell/libsmbios/issues/48
Signed-off-by: Timur Kristóf <venemo@fedoraproject.org>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jeremy Cline <jcline@redhat.com>
---
drivers/platform/x86/dell-laptop.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/platform/x86/dell-laptop.c b/drivers/platform/x86/dell-laptop.c
index c52c6723374b..f1fa8612db40 100644
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -38,6 +38,7 @@
struct quirk_entry {
bool touchpad_led;
bool kbd_led_levels_off_1;
+ bool kbd_missing_ac_tag;
bool needs_kbd_timeouts;
/*
@@ -68,6 +69,10 @@ static struct quirk_entry quirk_dell_xps13_9333 = {
.kbd_timeouts = { 0, 5, 15, 60, 5 * 60, 15 * 60, -1 },
};
+static struct quirk_entry quirk_dell_xps13_9370 = {
+ .kbd_missing_ac_tag = true,
+};
+
static struct quirk_entry quirk_dell_latitude_e6410 = {
.kbd_led_levels_off_1 = true,
};
@@ -291,6 +296,15 @@ static const struct dmi_system_id dell_quirks[] __initconst = {
},
.driver_data = &quirk_dell_xps13_9333,
},
+ {
+ .callback = dmi_matched,
+ .ident = "Dell XPS 13 9370",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "XPS 13 9370"),
+ },
+ .driver_data = &quirk_dell_xps13_9370,
+ },
{
.callback = dmi_matched,
.ident = "Dell Latitude E6410",
@@ -1401,7 +1415,8 @@ static inline int kbd_init_info(void)
* timeout value which is shared for both battery and AC power
* settings. So do not try to set AC values on old models.
*/
- if (dell_smbios_find_token(KBD_LED_AC_TOKEN))
+ if ((quirks && quirks->kbd_missing_ac_tag) ||
+ dell_smbios_find_token(KBD_LED_AC_TOKEN))
kbd_timeout_ac_supported = true;
kbd_get_state(&state);
--
2.17.1