Merge tag 'drm-next-2023-11-10' of git://anongit.freedesktop.org/drm/drm
[linux-2.6-microblaze.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_acpi.c
index e550067..2deebec 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)