Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux
[cascardo/linux.git] / drivers / gpu / drm / nouveau / nouveau_acpi.c
index cfbeee6..07273a2 100644 (file)
@@ -314,6 +314,16 @@ static bool nouveau_dsm_detect(void)
                        has_optimus = 1;
        }
 
+       while ((pdev = pci_get_class(PCI_CLASS_DISPLAY_3D << 8, pdev)) != NULL) {
+               vga_count++;
+
+               retval = nouveau_dsm_pci_probe(pdev);
+               if (retval & NOUVEAU_DSM_HAS_MUX)
+                       has_dsm |= 1;
+               if (retval & NOUVEAU_DSM_HAS_OPT)
+                       has_optimus = 1;
+       }
+
        /* find the optimus DSM or the old v1 DSM */
        if (has_optimus == 1) {
                acpi_get_name(nouveau_dsm_priv.dhandle, ACPI_FULL_PATHNAME,