diff options
author | Peter Wu <peter@lekensteyn.nl> | 2016-07-07 18:39:02 +0200 |
---|---|---|
committer | Peter Wu <peter@lekensteyn.nl> | 2016-07-07 18:39:02 +0200 |
commit | 8e35364eba03ff07899a3c62a7cc9cf487e1f2fc (patch) | |
tree | 45767ab81d442f25c2ef16b44d15df8ed11439a6 | |
parent | 478bd811ac82db5297527645fa09ead7149fec81 (diff) | |
download | linux-nouveau-acpi-v2.3-with-pci-pm-d3.tar.gz |
drm/nouveau/acpi: use DSM if bridge does not support D3coldnouveau-acpi-v2.3-with-pci-pm-d3
Even if PR3 support is available on the bridge, it will not be used if
the PCI layer considers it unavailable. Ensure that this condition is
checked to allow a fallback to the Optimus DSM for device poweroff.
Signed-off-by: Peter Wu <peter@lekensteyn.nl>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_acpi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 38a64456313d..6d49517d480e 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -223,6 +223,9 @@ static bool nouveau_pr3_present(struct pci_dev *pdev) if (!parent_pdev) return false; + if (!pci_bridge_d3_possible(parent_pdev)) + return false; + parent_adev = ACPI_COMPANION(&parent_pdev->dev); if (!parent_adev) return false; |