* [PATCH] Intel pci device quirk remove D3 delay
@ 2013-09-10 23:10 Todd E Brandt
2013-09-11 13:20 ` Rafael J. Wysocki
2013-09-24 23:19 ` Bjorn Helgaas
0 siblings, 2 replies; 6+ messages in thread
From: Todd E Brandt @ 2013-09-10 23:10 UTC (permalink / raw)
To: bhelgaas; +Cc: linux-pci, arjan
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.
Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
drivers/pci/quirks.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index e85d230..98ea960 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -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.
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Intel pci device quirk remove D3 delay
2013-09-10 23:10 [PATCH] Intel pci device quirk remove D3 delay Todd E Brandt
@ 2013-09-11 13:20 ` Rafael J. Wysocki
2013-09-24 23:19 ` Bjorn Helgaas
1 sibling, 0 replies; 6+ messages in thread
From: Rafael J. Wysocki @ 2013-09-11 13:20 UTC (permalink / raw)
To: todd.e.brandt; +Cc: bhelgaas, linux-pci, arjan
On Tuesday, September 10, 2013 04:10:43 PM Todd E Brandt wrote:
> 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.
>
> Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> drivers/pci/quirks.c | 23 +++++++++++++++++++++++
> 1 file changed, 23 insertions(+)
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index e85d230..98ea960 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Intel pci device quirk remove D3 delay
2013-09-10 23:10 [PATCH] Intel pci device quirk remove D3 delay Todd E Brandt
2013-09-11 13:20 ` Rafael J. Wysocki
@ 2013-09-24 23:19 ` Bjorn Helgaas
2013-09-25 21:48 ` Bjorn Helgaas
1 sibling, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2013-09-24 23:19 UTC (permalink / raw)
To: Todd E Brandt; +Cc: linux-pci, arjan
On Tue, Sep 10, 2013 at 04:10:43PM -0700, Todd E Brandt wrote:
> 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.
> 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.
>
> Signed-off-by: Todd Brandt <todd.e.brandt@linux.intel.com>
>
> 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
>
> diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
> index e85d230..98ea960 100644
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -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.
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Intel pci device quirk remove D3 delay
2013-09-24 23:19 ` Bjorn Helgaas
@ 2013-09-25 21:48 ` Bjorn Helgaas
2013-09-25 22:17 ` Arjan van de Ven
0 siblings, 1 reply; 6+ messages in thread
From: Bjorn Helgaas @ 2013-09-25 21:48 UTC (permalink / raw)
To: Todd E Brandt; +Cc: linux-pci@vger.kernel.org, arjan
On Tue, Sep 24, 2013 at 5:19 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> On Tue, Sep 10, 2013 at 04:10:43PM -0700, Todd E Brandt wrote:
>> 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
>> 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Intel pci device quirk remove D3 delay
2013-09-25 21:48 ` Bjorn Helgaas
@ 2013-09-25 22:17 ` Arjan van de Ven
2013-09-25 23:01 ` Bjorn Helgaas
0 siblings, 1 reply; 6+ messages in thread
From: Arjan van de Ven @ 2013-09-25 22:17 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Todd E Brandt, linux-pci@vger.kernel.org
On 9/25/2013 2:48 PM, Bjorn Helgaas wrote:
> On Tue, Sep 24, 2013 at 5:19 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
>> On Tue, Sep 10, 2013 at 04:10:43PM -0700, Todd E Brandt wrote:
>>> 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 :)
it should read "Haswell".
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Intel pci device quirk remove D3 delay
2013-09-25 22:17 ` Arjan van de Ven
@ 2013-09-25 23:01 ` Bjorn Helgaas
0 siblings, 0 replies; 6+ messages in thread
From: Bjorn Helgaas @ 2013-09-25 23:01 UTC (permalink / raw)
To: Arjan van de Ven; +Cc: Todd E Brandt, linux-pci@vger.kernel.org
On Wed, Sep 25, 2013 at 4:17 PM, Arjan van de Ven <arjan@linux.intel.com> wrote:
> On 9/25/2013 2:48 PM, Bjorn Helgaas wrote:
>>
>> On Tue, Sep 24, 2013 at 5:19 PM, Bjorn Helgaas <bhelgaas@google.com>
>> wrote:
>>>
>>> On Tue, Sep 10, 2013 at 04:10:43PM -0700, Todd E Brandt wrote:
>>>>
>>>> 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 :)
>
>
> it should read "Haswell".
Fixed, thanks!
Bjorn
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-09-25 23:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-10 23:10 [PATCH] Intel pci device quirk remove D3 delay Todd E Brandt
2013-09-11 13:20 ` Rafael J. Wysocki
2013-09-24 23:19 ` Bjorn Helgaas
2013-09-25 21:48 ` Bjorn Helgaas
2013-09-25 22:17 ` Arjan van de Ven
2013-09-25 23:01 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).