diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c index 193573d..ed233f1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_acpi.c +++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c @@ -225,7 +225,12 @@ static bool nouveau_pr3_present(struct pci_dev *pdev) if (!parent_pdev) return false; - if (!parent_pdev->bridge_d3) { + parent_adev = ACPI_COMPANION(&parent_pdev->dev); + if (!parent_adev) + return false; + + if (!parent_pdev->bridge_d3 || !parent_adev->power.flags.power_resources + || !acpi_has_method(parent_adev->handle, "_PR3")) { /* * Parent PCI bridge is currently not power managed. * Since userspace can change these afterwards to be on @@ -236,12 +241,7 @@ static bool nouveau_pr3_present(struct pci_dev *pdev) return false; } - parent_adev = ACPI_COMPANION(&parent_pdev->dev); - if (!parent_adev) - return false; - - return parent_adev->power.flags.power_resources && - acpi_has_method(parent_adev->handle, "_PR3"); + return true; } static void nouveau_dsm_pci_probe(struct pci_dev *pdev, acpi_handle *dhandle_out,