diff mbox series

[1/2] ACPI: video: Move Xiaomi Mi Pad 2 quirk to its own section

Message ID 20230915212902.59586-1-hdegoede@redhat.com
State Accepted
Commit 22c11b8f1b94ecd3e8c345df1d29eb3a5f931fff
Headers show
Series [1/2] ACPI: video: Move Xiaomi Mi Pad 2 quirk to its own section | expand

Commit Message

Hans de Goede Sept. 15, 2023, 9:29 p.m. UTC
The Xiaomi Mi Pad 2 is currently listed under the:
"Models which should use the vendor backlight interface,
because of broken ACPI video backlight control." section.

But this is not 100% correct. The Xiaomi Mi Pad 2 is one of a set of
x86 tablets which shipped with Android as factory OS. These tablets
have a TI LP8557 backlight controller with its PWM input _not_
connected to the PMIC or chipset (LPSS) PWM output.

Instead the backlight can be controlled by configuring the LP8557
for direct control through its brightness I2C register and then
using the lp855x driver.

This setup means that neither i915's native or acpi_video backlight
control works, so a "vendor" quirk is added for these tablets to
disable both the native and acpi_video backlight devices, but these
devices do not use vendor control in the typical meaning of
vendor specific SMBIOS or ACPI calls being used.

This patch is a preparation patch for adding "vendor" quirks
for a couple more such tablet models.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 drivers/acpi/video_detect.c | 26 ++++++++++++++++++--------
 1 file changed, 18 insertions(+), 8 deletions(-)

Comments

Rafael J. Wysocki Sept. 18, 2023, 6:53 p.m. UTC | #1
On Fri, Sep 15, 2023 at 11:29 PM Hans de Goede <hdegoede@redhat.com> wrote:
>
> The Xiaomi Mi Pad 2 is currently listed under the:
> "Models which should use the vendor backlight interface,
> because of broken ACPI video backlight control." section.
>
> But this is not 100% correct. The Xiaomi Mi Pad 2 is one of a set of
> x86 tablets which shipped with Android as factory OS. These tablets
> have a TI LP8557 backlight controller with its PWM input _not_
> connected to the PMIC or chipset (LPSS) PWM output.
>
> Instead the backlight can be controlled by configuring the LP8557
> for direct control through its brightness I2C register and then
> using the lp855x driver.
>
> This setup means that neither i915's native or acpi_video backlight
> control works, so a "vendor" quirk is added for these tablets to
> disable both the native and acpi_video backlight devices, but these
> devices do not use vendor control in the typical meaning of
> vendor specific SMBIOS or ACPI calls being used.
>
> This patch is a preparation patch for adding "vendor" quirks
> for a couple more such tablet models.
>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> ---
>  drivers/acpi/video_detect.c | 26 ++++++++++++++++++--------
>  1 file changed, 18 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
> index 442396f6ed1f..889902a4fdfe 100644
> --- a/drivers/acpi/video_detect.c
> +++ b/drivers/acpi/video_detect.c
> @@ -229,14 +229,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,
> @@ -799,6 +791,24 @@ 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,
> +        /* Xiaomi Mi Pad 2 */
> +        .matches = {
> +               DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
> +               DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
> +               },
> +       },
>         { },
>  };
>
> --

Applied as 6.7 material along with the [2/2], thanks!
diff mbox series

Patch

diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
index 442396f6ed1f..889902a4fdfe 100644
--- a/drivers/acpi/video_detect.c
+++ b/drivers/acpi/video_detect.c
@@ -229,14 +229,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,
@@ -799,6 +791,24 @@  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,
+	 /* Xiaomi Mi Pad 2 */
+	 .matches = {
+		DMI_MATCH(DMI_SYS_VENDOR, "Xiaomi Inc"),
+		DMI_MATCH(DMI_PRODUCT_NAME, "Mipad2"),
+		},
+	},
 	{ },
 };