OSDN Git Service

ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller
authorHans de Goede <hdegoede@redhat.com>
Sun, 23 Sep 2018 13:58:10 +0000 (15:58 +0200)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 30 Sep 2018 20:38:24 +0000 (22:38 +0200)
commit2d71ee0ce72f2597962fb2e66153f94d692142ba
tree1bf50e14f34796a535203abfcb9d17b4e8a586d8
parentbd0f4e342e006366a7f4e77f8d01e42c2e8ca992
ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller

On some Bay Trail systems the GPU ACPI fwnode has power-resources which
point to the PMIC, which is connected over the LPSS I2C5 controller.

This one was quite nasty to debug, unlike on CHT where the same problem
leads to errors like these:

     i2c_designware 808622C1:06: controller timed out
     ACPI Error: AE_ERROR, Returned by Handler for [UserDefinedRegion]
     ACPI Error: Method parse/execution failed \_SB.P18W._ON, AE_ERROR
     video LNXVIDEO:00: Failed to change power state to D0

On BYT the read-modify-write done by drivers/acpi/pmic/intel_pmic_xpower.c
on the AXP288 PMIC register to change the power-resource state *seems* to
succeed.

But in reality, because the I2C controller has not been resumed yet, the
read silently fails and returns the wrong value, where as the write does
succeed, writing back the wrong value for all the other power-resources
in the same register, turning off a bunch of them. Which of course does
not end well.

This commit adds a RPM consumer link from the GPU (which has a LNXVIDEO
HID) to the BYT LPSS I2C5 controller, so that the I2C controller gets
resumed before the GPU is resumed and thus before we try to change the
power-resource.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/acpi_lpss.c