aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-12-22 13:09:52 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-12-31 21:14:51 -0500
commit4b4b3b20e8e645be103cf737827372f86479867a (patch)
treeb887ba92943e514c2e01f9557c994c362ee014be
parent05bc59a079eaa6c38b049473fe62fab84d934802 (diff)
ACPI / video: Add quirks for the Dell Vostro V131
The Dell Vostro V131 has an especially broken acpi-video implementation. The backlight control bits work, but when the brightness is changed via the acpi-video interface the backlight flickers annoyingly before settling at the new brightness, switching to using the native interface fixes the flickering so add a quirk for this (the vendor interface has the same problem). Brightness keypresses reported through the acpi-video-bus are also broken, they get reported one event delayed, so if you press the brightness-up hotkey on the keyboard nothing happens, then if you press brightness-down, the previous brightness-up event gets reported. Since the keypresses are also reported via wmi (if active) and via atkbd (when wmi is not active) add a quirk to simply filter out the delayed (broken) events. Reported-and-tested-by: Michał Kępień <kernel@kempniu.pl> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpi_video.c25
-rw-r--r--drivers/acpi/video_detect.c8
2 files changed, 33 insertions, 0 deletions
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 2971154fdd62..80b13d498091 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -419,6 +419,13 @@ static int video_enable_only_lcd(const struct dmi_system_id *d)
419 return 0; 419 return 0;
420} 420}
421 421
422static int video_set_report_key_events(const struct dmi_system_id *id)
423{
424 if (report_key_events == -1)
425 report_key_events = (uintptr_t)id->driver_data;
426 return 0;
427}
428
422static struct dmi_system_id video_dmi_table[] = { 429static struct dmi_system_id video_dmi_table[] = {
423 /* 430 /*
424 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 431 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
@@ -507,6 +514,24 @@ static struct dmi_system_id video_dmi_table[] = {
507 DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile M9410"), 514 DMI_MATCH(DMI_PRODUCT_NAME, "ESPRIMO Mobile M9410"),
508 }, 515 },
509 }, 516 },
517 /*
518 * Some machines report wrong key events on the acpi-bus, suppress
519 * key event reporting on these. Note this is only intended to work
520 * around events which are plain wrong. In some cases we get double
521 * events, in this case acpi-video is considered the canonical source
522 * and the events from the other source should be filtered. E.g.
523 * by calling acpi_video_handles_brightness_key_presses() from the
524 * vendor acpi/wmi driver or by using /lib/udev/hwdb.d/60-keyboard.hwdb
525 */
526 {
527 .callback = video_set_report_key_events,
528 .driver_data = (void *)((uintptr_t)REPORT_OUTPUT_KEY_EVENTS),
529 .ident = "Dell Vostro V131",
530 .matches = {
531 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
532 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
533 },
534 },
510 {} 535 {}
511}; 536};
512 537
diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index daaf1c4e1e0f..8fe2682380e9 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -279,6 +279,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
279 DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro12,1"), 279 DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro12,1"),
280 }, 280 },
281 }, 281 },
282 {
283 .callback = video_detect_force_native,
284 .ident = "Dell Vostro V131",
285 .matches = {
286 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
287 DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
288 },
289 },
282 { }, 290 { },
283}; 291};
284 292