diff options
author | Tony Lambiris | 2017-03-24 01:05:27 -0400 |
---|---|---|
committer | Tony Lambiris | 2017-03-24 01:05:27 -0400 |
commit | 35f7ea802ca62c1f09e692307261ef73109018d4 (patch) | |
tree | f16581f57ca56e5dcd49766598003330e676a510 /apple-gmux.patch | |
parent | abaa6b65dc79d454392d533f56608a6213e4ec84 (diff) | |
download | aur-35f7ea802ca62c1f09e692307261ef73109018d4.tar.gz |
Version bump for linux-macbook
Diffstat (limited to 'apple-gmux.patch')
-rw-r--r-- | apple-gmux.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/apple-gmux.patch b/apple-gmux.patch index f1a0621580a4..ce1f86717632 100644 --- a/apple-gmux.patch +++ b/apple-gmux.patch @@ -1,24 +1,24 @@ ---- a/drivers/platform/x86/apple-gmux.c -+++ a/drivers/platform/x86/apple-gmux.c +--- 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," @@ -27,5 +27,5 @@ + pci_dev_put(dgp); + return igp; } - + static int gmux_probe(struct pnp_dev *pnp, const struct pnp_device_id *id) |