Intel pci device quirk remove D3 delay
PATCH 1/1 Intel pci device quirk remove D3 delay
The latest Ivy Bridge Intel chipsets have a hardware optimization which allows on-chip PCI devices to ignore the 10ms delay before entering or exitting D3 suspend.
This patch implements the optimization as a pci quirk, since we want tight control over which devices use it. This way we can test each device individually to be sure there are no issues before we enable the quirk. The first set of devices are from the Haswell platform, which includes every PCI device that is on the northbridge and southbridge.
After testing this patch reduces the haswell suspend time from 93 ms to 47 ms and resume time from 160 ms to 64 ms.
drivers/pci/quirks.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/pci/quirks.c +23 -0
@@ -2955,6 +2955,29 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x010a , disable_igfx_irq);/* +* PCI devices which are on Intel chips can skip the 10ms delay +* before entering D3 mode. +*/ +static void quirk_remove_d3_delay (struct pci_dev *dev) +{ + dev->d3_delay =0 ; +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0c00 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0412 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0c0c , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c31 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c3a , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c3d , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c2d , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c20 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c18 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c1c , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c26 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c4e , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c02 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c22 , quirk_remove_d3_delay); + +/* * Some devices may pass our check in pci_intx_mask_supported if * PCI_COMMAND_INTX_DISABLE works though they actually do not properly * support this feature.
Quoted 10 lines · Todd E Brandt
The latest Ivy Bridge Intel chipsets have a hardware optimization which allows on-chip PCI devices to ignore the 10ms delay before entering or exitting D3 suspend.
This patch implements the optimization as a pci quirk, since we want tight control over which devices use it. This way we can test each device individually to be sure there are no issues before we enable the quirk. The first set of devices are from the Haswell platform, which includes every PCI device that is on the northbridge and southbridge.
Quoted 4 lines
After testing this patch reduces the haswell suspend time from 93 ms to 47 ms and resume time from 160 ms to 64 ms.
Signed-off-by Todd Brandt <[email protected]>
Quoted 42 lines
drivers/pci/quirks.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)drivers/pci/quirks.c +23
-1@@ -2955,6 +2955,29 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x010a , disable_igfx_irq);/* +* PCI devices which are on Intel chips can skip the 10ms delay +* before entering D3 mode. +*/ +static void quirk_remove_d3_delay (struct pci_dev *dev) +{ + dev->d3_delay =0 ; +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0c00 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0412 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0c0c , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c31 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c3a , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c3d , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c2d , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c20 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c18 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c1c , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c26 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c4e , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c02 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c22 , quirk_remove_d3_delay); + +/* * Some devices may pass our check in pci_intx_mask_supported if * PCI_COMMAND_INTX_DISABLE works though they actually do not properly * support this feature. -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 2 lines
I speak only for myself. Rafael J. Wysocki, Intel Open Source Technology Center.
Bjorn Helgaas
maintainerQuoted 1 line · Todd E Brandt
The latest Ivy Bridge Intel chipsets have a hardware optimization which
You said "Ivy Bridge" above but use "Haswell" below. Let me know if anything needs to be corrected here.
Quoted 9 lines
allows on-chip PCI devices to ignore the 10ms delay before entering or exitting D3 suspend.
This patch implements the optimization as a pci quirk, since we want tight control over which devices use it. This way we can test each device individually to be sure there are no issues before we enable the quirk. The first set of devices are from the Haswell platform, which includes every PCI device that is on the northbridge and southbridge.
Quoted 7 lines
After testing this patch reduces the haswell suspend time from 93 ms to 47 ms and resume time from 160 ms to 64 ms.
Signed-off-by Todd Brandt <[email protected]>drivers/pci/quirks.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
I added Rafael's ack and applied this for v3.13 (but I can still make corrections if required).
Let me know if you want this in v3.12 instead.
Bjorn
Quoted 36 lines
drivers/pci/quirks.c +23
-0@@ -2955,6 +2955,29 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0102, disable_igfx_irq);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x010a , disable_igfx_irq);/* +* PCI devices which are on Intel chips can skip the 10ms delay +* before entering D3 mode. +*/ +static void quirk_remove_d3_delay (struct pci_dev *dev) +{ + dev->d3_delay =0 ; +} +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0c00 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0412 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x0c0c , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c31 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c3a , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c3d , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c2d , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c20 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c18 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c1c , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c26 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c4e , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c02 , quirk_remove_d3_delay); +DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x8c22 , quirk_remove_d3_delay); + +/* * Some devices may pass our check in pci_intx_mask_supported if * PCI_COMMAND_INTX_DISABLE works though they actually do not properly * support this feature.
Bjorn Helgaas
maintainerQuoted 5 lines · Bjorn Helgaas
Quoted 1 line · Todd E Brandt
The latest Ivy Bridge Intel chipsets have a hardware optimization which
You said "Ivy Bridge" above but use "Haswell" below. Let me know if anything needs to be corrected here.
Reading this again, the text really doesn't make sense as-is. So please confirm what this should say.
It sure looks like it should say "The latest *Haswell* Intel chipsets ..."
If you really mean "Ivy Bridge," then you should say something about how Haswell is related to Ivy Bridge. No doubt this is all obvious to Intel folks, but it's not to me :)
Bjorn
Quoted 11 lines
Quoted 11 lines
allows on-chip PCI devices to ignore the 10ms delay before entering or exitting D3 suspend.
This patch implements the optimization as a pci quirk, since we want tight control over which devices use it. This way we can test each device individually to be sure there are no issues before we enable the quirk. The first set of devices are from the Haswell platform, which includes every PCI device that is on the northbridge and southbridge.
After testing this patch reduces the haswell suspend time from 93 ms to 47 ms and resume time from 160 ms to 64 ms.
Quoted 7 lines · Bjorn Helgaas
Quoted 5 lines · Bjorn Helgaas
Quoted 1 line · Todd E Brandt
The latest Ivy Bridge Intel chipsets have a hardware optimization which
You said "Ivy Bridge" above but use "Haswell" below. Let me know if anything needs to be corrected here.
Quoted 8 lines
Reading this again, the text really doesn't make sense as-is. So please confirm what this should say.
It sure looks like it should say "The latest *Haswell* Intel chipsets ..."
If you really mean "Ivy Bridge," then you should say something about how Haswell is related to Ivy Bridge. No doubt this is all obvious to Intel folks, but it's not to me :)
it should read "Haswell".
Bjorn Helgaas
maintainerQuoted 17 lines · Arjan van de Ven
Quoted 16 lines · Bjorn Helgaas
Quoted 8 lines · Bjorn Helgaas
Quoted 2 lines · Todd E Brandt
The latest Ivy Bridge Intel chipsets have a hardware optimization which
You said "Ivy Bridge" above but use "Haswell" below. Let me know if anything needs to be corrected here.
Reading this again, the text really doesn't make sense as-is. So please confirm what this should say.
Quoted 8 lines
Quoted 5 lines
It sure looks like it should say "The latest *Haswell* Intel chipsets ..."
If you really mean "Ivy Bridge," then you should say something about how Haswell is related to Ivy Bridge. No doubt this is all obvious to Intel folks, but it's not to me :)
it should read "Haswell".
Fixed, thanks!
Bjorn