diff options
author | Tony Lambiris | 2016-07-05 19:28:38 -0400 |
---|---|---|
committer | Tony Lambiris | 2016-07-05 19:28:38 -0400 |
commit | f9da30a5aa361ec24db25875a9fe254f72d4a9c3 (patch) | |
tree | edfe92cad38d16b18d5296a12365d4ee9703ab2d /apple-gmux.patch | |
parent | 78a8b2e91463f7e66ad55bcd362ab25728e80b79 (diff) | |
download | aur-f9da30a5aa361ec24db25875a9fe254f72d4a9c3.tar.gz |
Renaming linux-macbook-pro to linux-macbook
Diffstat (limited to 'apple-gmux.patch')
-rw-r--r-- | apple-gmux.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/apple-gmux.patch b/apple-gmux.patch new file mode 100644 index 000000000000..f1a0621580a4 --- /dev/null +++ b/apple-gmux.patch @@ -0,0 +1,31 @@ +--- a/drivers/platform/x86/apple-gmux.c ++++ a/drivers/platform/x86/apple-gmux.c +@@ -419,6 +419,7 @@ static int gmux_resume(struct device *dev) + + static struct pci_dev *gmux_get_io_pdev(void) + { ++ struct pci_dev *igp = NULL, *dgp = NULL; + struct pci_dev *pdev = NULL; + + while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev))) { +@@ -428,10 +429,18 @@ static struct pci_dev *gmux_get_io_pdev(void) + if (!(cmd & PCI_COMMAND_IO)) + continue; + +- return pdev; ++ if (pdev->bus && pdev->bus->number > 0 && !dgp) ++ dgp = pci_dev_get(pdev); ++ else if (pdev->bus && pdev->bus->number == 0 && !igp) ++ igp = pci_dev_get(pdev); + } + +- return NULL; ++ if (dgp && !igp) ++ pr_warn("Found only discrete GPU %s, integrated GPU is hidden," ++ " unable to protect backlight behind VGA IO", ++ pci_name(dgp)); ++ pci_dev_put(dgp); ++ return igp; + } + + static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) |