]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ACPI: video: use platform backlight driver on Xiaomi Mi Pad 2
authorHans de Goede <hdegoede@redhat.com>
Wed, 3 Nov 2021 14:26:20 +0000 (15:26 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 3 Nov 2021 18:32:21 +0000 (19:32 +0100)
The Xiaomi Mi Pad 2 is a Cherry Trail based x86 tablet which does not
use the i915's driver backlight control support:
 i915 0000:00:02.0: [drm:intel_panel_setup_backlight [i915]] no backlight present per VBT

Like all Cherry Trail devices the ACPI tables on the Xiaomi Mi Pad 2
contain a broken ACPI-video implementation which causes 6 different
acpi_video backlights to get registered when used.

The lack of the i915 driver registering a BACKLIGHT_RAW (aka native) type
backlight causes acpi_video_get_backlight_type() to pick the broken
acpi_video backlight code as the backlight driver to use.

There actually is a separate lp8556 backlight controller connected
over I2C which gets registered as a BACKLIGHT_PLATFORM (aka vendor).

Add a quirk to force acpi_video_get_backlight_type() to return
acpi_backlight_vendor, so that the broken acpi_video backlight
interfaces do not get registered.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/video_detect.c

index 7a1f8e823208774c62aeb751c7d13f911803ee2a..068e393ea0c678590d8cb24f9ef8864c2b7b8f89 100644 (file)
@@ -154,6 +154,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
                DMI_MATCH(DMI_PRODUCT_NAME, "VPCEH3U1E"),
                },
        },
+       {
+       .callback = video_detect_force_vendor,
+       /* Xiaomi Mi Pad 2 */
+       .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
+               },
+       },
 
        /*
         * These models have a working acpi_video backlight control, and using