Commit d1fbd923 authored by Dave Airlie's avatar Dave Airlie

nouveau/acpi: improve detection of what is IGD and what is DIS.

This improves the IGD/DIS picking using firstly if Intel, then
if the bus is bus 0. There may be a correct way to do this, but
I've no idea what it is.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 5ccb377f
...@@ -130,9 +130,14 @@ static int nouveau_dsm_init(void) ...@@ -130,9 +130,14 @@ static int nouveau_dsm_init(void)
static int nouveau_dsm_get_client_id(struct pci_dev *pdev) static int nouveau_dsm_get_client_id(struct pci_dev *pdev)
{ {
if (nouveau_dsm_priv.dhandle == DEVICE_ACPI_HANDLE(&pdev->dev)) /* easy option one - intel vendor ID means Integrated */
if (pdev->vendor == PCI_VENDOR_ID_INTEL)
return VGA_SWITCHEROO_IGD; return VGA_SWITCHEROO_IGD;
else
/* is this device on Bus 0? - this may need improving */
if (pdev->bus->number == 0)
return VGA_SWITCHEROO_IGD;
return VGA_SWITCHEROO_DIS; return VGA_SWITCHEROO_DIS;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment