if (rdev->flags & RADEON_IS_PX)
runtime = true;
- vga_switcheroo_register_client(rdev->pdev, &radeon_switcheroo_ops, runtime);
+ if (!pci_is_thunderbolt_attached(rdev->pdev))
+ vga_switcheroo_register_client(rdev->pdev,
+ &radeon_switcheroo_ops, runtime);
if (runtime)
vga_switcheroo_init_domain_pm_ops(rdev->dev, &rdev->vga_pm_domain);
/* evict vram memory */
radeon_bo_evict_vram(rdev);
radeon_fini(rdev);
- vga_switcheroo_unregister_client(rdev->pdev);
+ if (!pci_is_thunderbolt_attached(rdev->pdev))
+ vga_switcheroo_unregister_client(rdev->pdev);
if (rdev->flags & RADEON_IS_PX)
vga_switcheroo_fini_domain_pm_ops(rdev->dev);
vga_client_register(rdev->pdev, NULL, NULL, NULL);
if ((radeon_runtime_pm != 0) &&
radeon_has_atpx() &&
- ((flags & RADEON_IS_IGP) == 0))
+ ((flags & RADEON_IS_IGP) == 0) &&
+ !pci_is_thunderbolt_attached(rdev->pdev))
flags |= RADEON_IS_PX;
/* radeon_device_init should report only fatal error