[Intel-gfx] [PATCH v8 1/2] ACPI / bus: Introduce a list of ids for "always present" devices

Rafael J. Wysocki rjw at rjwysocki.net
Wed Apr 26 21:59:21 UTC 2017


On Friday, April 21, 2017 01:43:51 PM Hans de Goede wrote:
> Hi,
> 
> On 21-04-17 13:38, Andy Shevchenko wrote:
> > On Fri, 2017-04-21 at 12:47 +0200, Hans de Goede wrote:
> >> Several Bay / Cherry Trail devices (all of which ship with Windows 10)
> >> hide
> >> the LPSS PWM controller in ACPI, typically the _STA method looks like
> >> this:
> >>
> >>      Method (_STA, 0, NotSerialized)  // _STA: Status
> >>      {
> >>          If (OSID == One)
> >>          {
> >>              Return (Zero)
> >>          }
> >>
> >>          Return (0x0F)
> >>      }
> >>
> >> Where OSID is some dark magic seen in all Cherry Trail ACPI tables
> >> making
> >> the machine behave differently depending on which OS it *thinks* it is
> >> booting, this gets set in a number of ways which we cannot control, on
> >> some newer machines it simple hardcoded to "One" aka win10.
> >>
> >> This causes the PWM controller to get hidden, which means Linux cannot
> >> control the backlight level on cht based tablets / laptops.
> >>
> >> Since loading the driver for this does no harm (the only in kernel
> >> user
> >> of it is the i915 driver, which will only uses it when it needs it),
> >> this
> >> commit makes acpi_bus_get_status() always set status to
> >> ACPI_STA_DEFAULT
> >> for the LPSS PWM device, fixing the lack of backlight control.
> >>
> > 
> >>   drivers/acpi/Makefile        |  1 +
> >>   drivers/acpi/bus.c           |  5 +++
> >>   drivers/acpi/x86/x86_utils.c | 85
> >> ++++++++++++++++++++++++++++++++++++++++++++
> > 
> > Perhaps .../x86/utils.c ?
> 
> I thought that utils.c would be too generic,
> but that was mainly thinking about module kernel
> cmdline options which do not apply here, still
> having a somewhat unique basename seems useful.

I renamed it to util.c while applying the patches.

Thanks,
Rafael



More information about the Intel-gfx mailing list