aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_acpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_acpi.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_acpi.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_acpi.c b/drivers/gpu/drm/nouveau/nouveau_acpi.c
index 119152606e4c..a54238058dc5 100644
--- a/drivers/gpu/drm/nouveau/nouveau_acpi.c
+++ b/drivers/gpu/drm/nouveau/nouveau_acpi.c
@@ -130,10 +130,15 @@ static int nouveau_dsm_init(void)
130 130
131static int nouveau_dsm_get_client_id(struct pci_dev *pdev) 131static int nouveau_dsm_get_client_id(struct pci_dev *pdev)
132{ 132{
133 if (nouveau_dsm_priv.dhandle == DEVICE_ACPI_HANDLE(&pdev->dev)) 133 /* easy option one - intel vendor ID means Integrated */
134 if (pdev->vendor == PCI_VENDOR_ID_INTEL)
134 return VGA_SWITCHEROO_IGD; 135 return VGA_SWITCHEROO_IGD;
135 else 136
136 return VGA_SWITCHEROO_DIS; 137 /* is this device on Bus 0? - this may need improving */
138 if (pdev->bus->number == 0)
139 return VGA_SWITCHEROO_IGD;
140
141 return VGA_SWITCHEROO_DIS;
137} 142}
138 143
139static struct vga_switcheroo_handler nouveau_dsm_handler = { 144static struct vga_switcheroo_handler nouveau_dsm_handler = {