From eea412076c9d24262ebd4811f766d5379b728045 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 14 Mar 2016 23:37:43 +1000 Subject: [PATCH] [RFC] PCI: enable runtime PM on pcieports to let secondary GPUs powerdown. With secondary GPUs in Windows 10 laptops we need to use runtime PM to power down the PCIe ports after the devices goes to D3Cold. This patch adds the PCI ID for the Haswell 16x PCIE slot found in the W541 laptops. I should probably try and gather the PCI IDs, for broadwell/skylake variants as well if we can't find them. This fixes a regression on W541 laptops on top of Mika's PCIE patches since we started advertising Windows 2013 ACPI. [probably should be two patches - hence RFC] Signed-off-by: Dave Airlie --- drivers/pci/pcie/portdrv_pci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pcie/portdrv_pci.c b/drivers/pci/pcie/portdrv_pci.c index 43dd23e..1405de8 100644 --- a/drivers/pci/pcie/portdrv_pci.c +++ b/drivers/pci/pcie/portdrv_pci.c @@ -278,8 +278,10 @@ static int pcie_portdrv_probe(struct pci_dev *dev, pci_save_state(dev); - if (pcie_port_runtime_suspend_allowed(dev)) + if (pcie_port_runtime_suspend_allowed(dev)) { + pm_runtime_allow(&dev->dev); pm_runtime_put_noidle(&dev->dev); + } return 0; } @@ -436,6 +438,8 @@ static void pcie_portdrv_err_resume(struct pci_dev *dev) * LINUX Device Driver Model */ static const struct pci_device_id port_pci_ids[] = { + /* Intel Skylake PCIE graphics port */ + { PCI_VDEVICE(INTEL, 0x0c01), .driver_data = PCIE_PORT_SPT }, /* Intel Broxton */ { PCI_VDEVICE(INTEL, 0x1ad6), .driver_data = PCIE_PORT_SPT }, { PCI_VDEVICE(INTEL, 0x1ad7), .driver_data = PCIE_PORT_SPT }, -- 2.5.0