Skip to contentSkip to conversation

ACPI / video: Add quirk for the Dell Vostro 3350

PATCH Applied Hans de Goede 2 participants 2 messages Jun 30, 2021 ACPI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ACPI / video: Add quirk for the Dell Vostro 3350

The Dell Vostro 3350 ACPI video-bus device reports spurious ACPI_VIDEO_NOTIFY_CYCLE events resulting in spurious KEY_SWITCHVIDEOMODE events being reported to userspace (and causing trouble there).

Add a quirk setting the report_key_events mask to REPORT_BRIGHTNESS_KEY_EVENTS so that the ACPI_VIDEO_NOTIFY_CYCLE events will be ignored, while still reporting brightness up/down hotkey-presses to userspace normally.

---
 drivers/acpi/acpi_video.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/acpi/acpi_video.c +9 -0
index 0c884020f74b..08a51dd285c4 100644
@@ -540,6 +540,15 @@ static const struct dmi_system_id video_dmi_table[] = {
 		DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
 		},
 	},
+	{
+	 .callback = video_set_report_key_events,
+	 .driver_data = (void *)((uintptr_t)REPORT_BRIGHTNESS_KEY_EVENTS),
+	 .ident = "Dell Vostro 3350",
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+		DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 3350"),
+		},
+	},
 	/*
 	 * Some machines change the brightness themselves when a brightness
 	 * hotkey gets pressed, despite us telling them not to. In this case
Signature · 1 line
2.31.1
maintainer Applied
#1 lore raw
Quoted 27 lines · Hans de Goede

The Dell Vostro 3350 ACPI video-bus device reports spurious ACPI_VIDEO_NOTIFY_CYCLE events resulting in spurious KEY_SWITCHVIDEOMODE events being reported to userspace (and causing trouble there).

Add a quirk setting the report_key_events mask to REPORT_BRIGHTNESS_KEY_EVENTS so that the ACPI_VIDEO_NOTIFY_CYCLE events will be ignored, while still reporting brightness up/down hotkey-presses to userspace normally.

---
 drivers/acpi/acpi_video.c | 9 +++++++++
 1 file changed, 9 insertions(+)
drivers/acpi/acpi_video.c +3 -0
index 0c884020f74b..08a51dd285c4 100644
@@ -540,6 +540,15 @@ static const struct dmi_system_id video_dmi_table[] = {
                DMI_MATCH(DMI_PRODUCT_NAME, "Vostro V131"),
                },
        },
+       {
+        .callback = video_set_report_key_events,
+        .driver_data = (void *)((uintptr_t)REPORT_BRIGHTNESS_KEY_EVENTS),

drivers/acpi/acpi_video.c static const struct dmi_system_id video_dmi_table[] = {

Quoted 10 lines
drivers/acpi/acpi_video.c +6 -1
+        .ident = "Dell Vostro 3350",
+        .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 3350"),
+               },
+       },
        /*
         * Some machines change the brightness themselves when a brightness
         * hotkey gets pressed, despite us telling them not to. In this case
--

Applied as 5.14-rc1 material, thanks!