Skip to content

Commit 6025e2f

Browse files
jwrdegoederafaeljw
authored andcommitted
ACPI: LPSS: Add dmi quirk for skipping _DEP check for some device-links
The iGPU / GFX0 device's _PS0 method on the ASUS T200TA depends on the I2C1 controller (which is connected to the embedded controller). But unlike in the T100TA/T100CHI this dependency is not listed in the _DEP of the GFX0 device. This results in the dev_WARN_ONCE(..., "Transfer while suspended\n") call in i2c-designware-master.c triggering and the AML code not working as it should. This commit fixes this by adding a dmi based quirk mechanism for devices which miss a _DEP, and adding a quirk for the LNXVIDEO depending on the I2C1 device on the Asus T200TA. Fixes: 2d71ee0 ("ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller") Tested-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Cc: 4.20+ <[email protected]> # 4.20+ Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent b3b3519 commit 6025e2f

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

drivers/acpi/acpi_lpss.c

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#include <linux/acpi.h>
1111
#include <linux/clkdev.h>
1212
#include <linux/clk-provider.h>
13+
#include <linux/dmi.h>
1314
#include <linux/err.h>
1415
#include <linux/io.h>
1516
#include <linux/mutex.h>
@@ -463,6 +464,18 @@ struct lpss_device_links {
463464
const char *consumer_hid;
464465
const char *consumer_uid;
465466
u32 flags;
467+
const struct dmi_system_id *dep_missing_ids;
468+
};
469+
470+
/* Please keep this list sorted alphabetically by vendor and model */
471+
static const struct dmi_system_id i2c1_dep_missing_dmi_ids[] = {
472+
{
473+
.matches = {
474+
DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."),
475+
DMI_MATCH(DMI_PRODUCT_NAME, "T200TA"),
476+
},
477+
},
478+
{}
466479
};
467480

468481
/*
@@ -478,7 +491,8 @@ static const struct lpss_device_links lpss_device_links[] = {
478491
/* CHT iGPU depends on PMIC I2C controller */
479492
{"808622C1", "7", "LNXVIDEO", NULL, DL_FLAG_PM_RUNTIME},
480493
/* BYT iGPU depends on the Embedded Controller I2C controller (UID 1) */
481-
{"80860F41", "1", "LNXVIDEO", NULL, DL_FLAG_PM_RUNTIME},
494+
{"80860F41", "1", "LNXVIDEO", NULL, DL_FLAG_PM_RUNTIME,
495+
i2c1_dep_missing_dmi_ids},
482496
/* BYT CR iGPU depends on PMIC I2C controller (UID 5 on CR) */
483497
{"80860F41", "5", "LNXVIDEO", NULL, DL_FLAG_PM_RUNTIME},
484498
/* BYT iGPU depends on PMIC I2C controller (UID 7 on non CR) */
@@ -577,7 +591,8 @@ static void acpi_lpss_link_consumer(struct device *dev1,
577591
if (!dev2)
578592
return;
579593

580-
if (acpi_lpss_dep(ACPI_COMPANION(dev2), ACPI_HANDLE(dev1)))
594+
if ((link->dep_missing_ids && dmi_check_system(link->dep_missing_ids))
595+
|| acpi_lpss_dep(ACPI_COMPANION(dev2), ACPI_HANDLE(dev1)))
581596
device_link_add(dev2, dev1, link->flags);
582597

583598
put_device(dev2);
@@ -592,7 +607,8 @@ static void acpi_lpss_link_supplier(struct device *dev1,
592607
if (!dev2)
593608
return;
594609

595-
if (acpi_lpss_dep(ACPI_COMPANION(dev1), ACPI_HANDLE(dev2)))
610+
if ((link->dep_missing_ids && dmi_check_system(link->dep_missing_ids))
611+
|| acpi_lpss_dep(ACPI_COMPANION(dev1), ACPI_HANDLE(dev2)))
596612
device_link_add(dev1, dev2, link->flags);
597613

598614
put_device(dev2);

0 commit comments

Comments
 (0)