Linux 6.9-rc1
[linux-2.6-microblaze.git] / drivers / acpi / video_detect.c
index 18cc08c..9fdcc62 100644 (file)
@@ -130,6 +130,16 @@ static int video_detect_force_native(const struct dmi_system_id *d)
        return 0;
 }
 
+static int video_detect_portege_r100(const struct dmi_system_id *d)
+{
+       struct pci_dev *dev;
+       /* Search for Trident CyberBlade XP4m32 to confirm Portégé R100 */
+       dev = pci_get_device(PCI_VENDOR_ID_TRIDENT, 0x2100, NULL);
+       if (dev)
+               acpi_backlight_dmi = acpi_backlight_vendor;
+       return 0;
+}
+
 static const struct dmi_system_id video_detect_dmi_table[] = {
        /*
         * Models which should use the vendor backlight interface,
@@ -229,14 +239,6 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
                DMI_MATCH(DMI_BOARD_NAME, "NC210/NC110"),
                },
        },
-       {
-        .callback = video_detect_force_vendor,
-        /* Xiaomi Mi Pad 2 */
-        .matches = {
-                       DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
-                       DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
-               },
-       },
 
        /*
         * Models which should use the vendor backlight interface,
@@ -270,6 +272,22 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
                },
        },
 
+       /*
+        * Toshiba Portégé R100 has working both acpi_video and toshiba_acpi
+        * vendor driver. But none of them gets activated as it has a VGA with
+        * no kernel driver (Trident CyberBlade XP4m32).
+        * The DMI strings are generic so check for the VGA chip in callback.
+        */
+       {
+        .callback = video_detect_portege_r100,
+        .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
+               DMI_MATCH(DMI_PRODUCT_NAME, "Portable PC"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "Version 1.0"),
+               DMI_MATCH(DMI_BOARD_NAME, "Portable PC")
+               },
+       },
+
        /*
         * Models which need acpi_video backlight control where the GPU drivers
         * do not call acpi_video_register_backlight() because no internal panel
@@ -445,6 +463,15 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
                DMI_MATCH(DMI_BOARD_NAME, "Lenovo IdeaPad S405"),
                },
        },
+       {
+        /* https://bugzilla.suse.com/show_bug.cgi?id=1208724 */
+        .callback = video_detect_force_native,
+        /* Lenovo Ideapad Z470 */
+        .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "IdeaPad Z470"),
+               },
+       },
        {
         /* https://bugzilla.redhat.com/show_bug.cgi?id=1187004 */
         .callback = video_detect_force_native,
@@ -486,6 +513,24 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
                DMI_MATCH(DMI_PRODUCT_NAME, "iMac11,3"),
                },
        },
+       {
+        /* https://gitlab.freedesktop.org/drm/amd/-/issues/1838 */
+        .callback = video_detect_force_native,
+        /* Apple iMac12,1 */
+        .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,1"),
+               },
+       },
+       {
+        /* https://gitlab.freedesktop.org/drm/amd/-/issues/2753 */
+        .callback = video_detect_force_native,
+        /* Apple iMac12,2 */
+        .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "iMac12,2"),
+               },
+       },
        {
         /* https://bugzilla.redhat.com/show_bug.cgi?id=1217249 */
         .callback = video_detect_force_native,
@@ -772,6 +817,56 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
                DMI_MATCH(DMI_PRODUCT_NAME, "Vostro 15 3535"),
                },
        },
+
+       /*
+        * x86 android tablets which directly control the backlight through
+        * an external backlight controller, typically TI's LP8557.
+        * The backlight is directly controlled by the lp855x driver on these.
+        * This setup means that neither i915's native nor acpi_video backlight
+        * control works. Add a "vendor" quirk to disable both. Note these
+        * devices do not use vendor control in the typical meaning of
+        * vendor specific SMBIOS or ACPI calls being used.
+        */
+       {
+        .callback = video_detect_force_vendor,
+        /* Lenovo Yoga Book X90F / X90L */
+        .matches = {
+               DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+               DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
+               DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "YETI-11"),
+               },
+       },
+       {
+        .callback = video_detect_force_vendor,
+        /*
+         * Lenovo Yoga Tablet 2 830F/L or 1050F/L (The 8" and 10"
+         * Lenovo Yoga Tablet 2 use the same mainboard)
+         */
+        .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Intel Corp."),
+               DMI_MATCH(DMI_PRODUCT_NAME, "VALLEYVIEW C0 PLATFORM"),
+               DMI_MATCH(DMI_BOARD_NAME, "BYT-T FFD8"),
+               /* Partial match on beginning of BIOS version */
+               DMI_MATCH(DMI_BIOS_VERSION, "BLADE_21"),
+               },
+       },
+       {
+        .callback = video_detect_force_vendor,
+        /* Lenovo Yoga Tab 3 Pro YT3-X90F */
+        .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Intel Corporation"),
+               DMI_MATCH(DMI_PRODUCT_NAME, "CHERRYVIEW D1 PLATFORM"),
+               DMI_MATCH(DMI_PRODUCT_VERSION, "Blade3-10A-001"),
+               },
+       },
+       {
+        .callback = video_detect_force_vendor,
+        /* Xiaomi Mi Pad 2 */
+        .matches = {
+               DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
+               DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
+               },
+       },
        { },
 };