vga_client_register(dev->pdev, dev, NULL, nouveau_vga_set_decode);
+ /* don't register Thunderbolt eGPU with vga_switcheroo */
+ if (pci_is_thunderbolt_attached(dev->pdev))
+ return;
+
if (nouveau_runtime_pm == 1)
runtime = true;
if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm()))
struct drm_device *dev = drm->dev;
bool runtime = false;
+ vga_client_register(dev->pdev, NULL, NULL, NULL);
+
+ if (pci_is_thunderbolt_attached(dev->pdev))
+ return;
+
if (nouveau_runtime_pm == 1)
runtime = true;
if ((nouveau_runtime_pm == -1) && (nouveau_is_optimus() || nouveau_is_v1_dsm()))
vga_switcheroo_unregister_client(dev->pdev);
if (runtime && nouveau_is_v1_dsm() && !nouveau_is_optimus())
vga_switcheroo_fini_domain_pm_ops(drm->dev->dev);
- vga_client_register(dev->pdev, NULL, NULL, NULL);
}