]> Git Repo - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
Merge tag 'x86-boot-2024-01-08' of git://git.kernel.org/pub/scm/linux/kernel/git...
[linux.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_acpi.c
index d62e497586357da349c9f8ae57709cd5309783bc..2deebece810e78a7ce039772a839684f570bceca 100644 (file)
@@ -1393,14 +1393,11 @@ void amdgpu_acpi_detect(void)
        struct pci_dev *pdev = NULL;
        int ret;
 
-       while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, pdev)) != NULL) {
-               if (!atif->handle)
-                       amdgpu_atif_pci_probe_handle(pdev);
-               if (!atcs->handle)
-                       amdgpu_atcs_pci_probe_handle(pdev);
-       }
+       while ((pdev = pci_get_base_class(PCI_BASE_CLASS_DISPLAY, pdev))) {
+               if ((pdev->class != PCI_CLASS_DISPLAY_VGA << 8) &&
+                   (pdev->class != PCI_CLASS_DISPLAY_OTHER << 8))
+                       continue;
 
-       while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_OTHER << 8, pdev)) != NULL) {
                if (!atif->handle)
                        amdgpu_atif_pci_probe_handle(pdev);
                if (!atcs->handle)
@@ -1497,6 +1494,9 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
        if (adev->asic_type < CHIP_RAVEN)
                return false;
 
+       if (!(adev->pm.pp_feature & PP_GFXOFF_MASK))
+               return false;
+
        /*
         * If ACPI_FADT_LOW_POWER_S0 is not set in the FADT, it is generally
         * risky to do any special firmware-related preparations for entering
This page took 0.035023 seconds and 4 git commands to generate.