Re: [PATCH] ACPI: video: Add backlight=native DMI quirk for Asus U46E

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jan 19, 2023 at 6:24 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> The Asus U46E backlight tables have a set of interesting problems:
>
> 1. Its ACPI tables do make _OSI ("Windows 2012") checks, so
>    acpi_osi_is_win8() should return true.
>
>    But the tables have 2 sets of _OSI calls, one from the usual global
>    _INI method setting a global OSYS variable and a second set of _OSI
>    calls from a MSOS method and the MSOS method is the only one calling
>    _OSI ("Windows 2012").
>
>    The MSOS method only gets called in the following cases:
>    1. From some Asus specific WMI methods
>    2. From _DOD, which only runs after acpi_video_get_backlight_type()
>       has already been called by the i915 driver
>    3. From other ACPI video bus methods which never run (see below)
>    4. From some EC query callbacks
>
>    So when i915 calls acpi_video_get_backlight_type() MSOS has never run
>    and acpi_osi_is_win8() returns false, so acpi_video_get_backlight_type()
>    returns acpi_video as the desired backlight type, which causes
>    the intel_backlight device to not register.
>
> 2. _DOD effectively does this:
>
>                     Return (Package (0x01)
>                     {
>                         0x0400
>                     })
>
>    causing acpi_video_device_in_dod() to return false, which causes
>    the acpi_video backlight device to not register.
>
> Leaving the user with no backlight device at all. Note that before 6.1.y
> the i915 driver would register the intel_backlight device unconditionally
> and since that then was the only backlight device userspace would use that.
>
> Add a backlight=native DMI quirk for this special laptop to restore
> the old (and working) behavior of the intel_backlight device registering.
>
> Fixes: fb1836c91317 ("ACPI: video: Prefer native over vendor")
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> ---
>  drivers/acpi/video_detect.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/drivers/acpi/video_detect.c b/drivers/acpi/video_detect.c
> index aa6196e5e574..64eab35037c3 100644
> --- a/drivers/acpi/video_detect.c
> +++ b/drivers/acpi/video_detect.c
> @@ -610,6 +610,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = {
>                 DMI_MATCH(DMI_PRODUCT_NAME, "GA503"),
>                 },
>         },
> +       {
> +        .callback = video_detect_force_native,
> +        /* Asus U46E */
> +        .matches = {
> +               DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK Computer Inc."),
> +               DMI_MATCH(DMI_PRODUCT_NAME, "U46E"),
> +               },
> +       },
>         {
>          .callback = video_detect_force_native,
>          /* Asus UX303UB */
> --

Applied as 6.2-rcf material, thanks!



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux