mfd: intel-lpss: Set d3hot_delay to 0
PATCH v3 1/1 mfd: intel-lpss: Set d3hot_delay to 0
Every runtime resume of an LPSS controller waits the default 10 ms d3hot_delay in pci_power_up() for the D3hot->D0 transition. Nothing misbehaves, but the wait adds latency. On Arrow Lake-H (Lenovo Yoga Pro 7 14IAH10) the touchpad's I2C controller autosuspends after 1 s idle, and the i2c-hid interrupt handler for the first report afterwards takes 12.6-14.4 ms.
The PCI spec asks for those 10 ms, but Mika Westerberg pointed out that the LPSS controllers are not really PCI-connected devices, so the delay is likely not needed. intel-lpss-pci already clears d3cold_delay, quirk_remove_d3hot_delay() drops d3hot_delay on several older Intel chipsets, Cherry Trail among them, and commit 815b4448198f ("i3c:
mipi-i3c-hci-pci: Set d3hot_delay to 0 for Intel controllers") does the same for the Intel I3C controllers.
Set d3hot_delay to 0 as well. The handler above then takes 1.1-1.9 ms, with no I2C errors. Only Arrow Lake-H was tested.
---
Notes:
Changes in v3:
- Describe the delay first, then why it is not needed (Ilpo).
- Give Mika's full name (Ilpo).
- Add Mika's Acked-by.
Changes in v2:
- Drop RFC and add the review discussion to the changelog (Andy).
v2: https://lore.kernel.org/r/[email protected]
RFC: https://lore.kernel.org/r/[email protected]
drivers/mfd/intel-lpss-pci.c | 1 + 1 file changed, 1 insertion(+)
drivers/mfd/intel-lpss-pci.c +1 -0
@@ -70,6 +70,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev, info->quirks = quirk_pci_info->driver_data; pdev->d3cold_delay =0 ; + pdev->d3hot_delay =0 ;/* Probably it is enough to set this for iDMA capable devices only */ pci_set_master (pdev);
Signature · 1 line
2.56.0
[email protected]
AI reviewSashiko has reviewed this patch and found no issues.
Quoted 15 lines
Every runtime resume of an LPSS controller waits the default 10 ms
d3hot_delayinpci_power_up()for theD3hot->D0transition. Nothing misbehaves, but the wait adds latency. On Arrow Lake-H (Lenovo Yoga Pro 7 14IAH10) the touchpad's I2C controller autosuspends after 1 s idle, and the i2c-hid interrupt handler for the first report afterwards takes 12.6-14.4 ms.The PCI spec asks for those 10 ms, but Mika Westerberg pointed out that the LPSS controllers are not really PCI-connected devices, so the delay is likely not needed. intel-lpss-pci already clears
d3cold_delay,quirk_remove_d3hot_delay()dropsd3hot_delayon several older Intel chipsets, Cherry Trail among them, and commit815b4448198f("i3c:
mipi-i3c-hci-pci: Setd3hot_delayto 0 for Intel controllers") does the same for the Intel I3C controllers.
Quoted 5 lines
Set
d3hot_delayto 0 as well. The handler above then takes 1.1-1.9 ms, with no I2C errors. Only Arrow Lake-H was tested.Acked-by Mika Westerberg <[email protected]>Signed-off-by Navon John Lukose <[email protected]>
Sashiko has reviewed this patch and found no issues.
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Quoted 15 lines · Navon John Lukose
Every runtime resume of an LPSS controller waits the default 10 ms
d3hot_delayinpci_power_up()for theD3hot->D0transition. Nothing misbehaves, but the wait adds latency. On Arrow Lake-H (Lenovo Yoga Pro 7 14IAH10) the touchpad's I2C controller autosuspends after 1 s idle, and the i2c-hid interrupt handler for the first report afterwards takes 12.6-14.4 ms.The PCI spec asks for those 10 ms, but Mika Westerberg pointed out that the LPSS controllers are not really PCI-connected devices, so the delay is likely not needed. intel-lpss-pci already clears
d3cold_delay,quirk_remove_d3hot_delay()dropsd3hot_delayon several older Intel chipsets, Cherry Trail among them, and commit815b4448198f("i3c:
mipi-i3c-hci-pci: Setd3hot_delayto 0 for Intel controllers") does the same for the Intel I3C controllers.
Quoted 2 lines
Set
d3hot_delayto 0 as well. The handler above then takes 1.1-1.9 ms, with no I2C errors. Only Arrow Lake-H was tested.
Okay, we may go with this and I believe if any issue happens somewhere we will know that sooner than later.
Signature · 2 lines
With Best Regards, Andy Shevchenko
Quoted 15 lines · Navon John Lukose
Every runtime resume of an LPSS controller waits the default 10 ms
d3hot_delayinpci_power_up()for theD3hot->D0transition. Nothing misbehaves, but the wait adds latency. On Arrow Lake-H (Lenovo Yoga Pro 7 14IAH10) the touchpad's I2C controller autosuspends after 1 s idle, and the i2c-hid interrupt handler for the first report afterwards takes 12.6-14.4 ms.The PCI spec asks for those 10 ms, but Mika Westerberg pointed out that the LPSS controllers are not really PCI-connected devices, so the delay is likely not needed. intel-lpss-pci already clears
d3cold_delay,quirk_remove_d3hot_delay()dropsd3hot_delayon several older Intel chipsets, Cherry Trail among them, and commit815b4448198f("i3c:
mipi-i3c-hci-pci: Setd3hot_delayto 0 for Intel controllers") does the same for the Intel I3C controllers.
Quoted 2 lines
Set
d3hot_delayto 0 as well. The handler above then takes 1.1-1.9 ms, with no I2C errors. Only Arrow Lake-H was tested.
The new text reads much better, thanks,
--
i.
Quoted 32 lines
Acked-by Mika Westerberg <[email protected]>Signed-off-by Navon John Lukose <[email protected]>---
Notes:
Changes in v3:
- Describe the delay first, then why it is not needed (Ilpo).
- Give Mika's full name (Ilpo).
- Add Mika's Acked-by.Changes in v2:
- Drop RFC and add the review discussion to the changelog (Andy).v2: https://lore.kernel.org/r/[email protected]
RFC: https://lore.kernel.org/r/[email protected]drivers/mfd/intel-lpss-pci.c | 1 + 1 file changed, 1 insertion(+)drivers/mfd/intel-lpss-pci.c +1
-0@@ -70,6 +70,7 @@ static int intel_lpss_pci_probe(struct pci_dev *pdev, info->quirks = quirk_pci_info->driver_data; pdev->d3cold_delay =0 ; + pdev->d3hot_delay =0 ;/* Probably it is enough to set this for iDMA capable devices only */ pci_set_master (pdev);
Re: (subset) [PATCH v3] mfd: intel-lpss: Set d3hot_delay to 0
In reply to Navon John LukoseQuoted 8 lines · Navon John Lukose
Every runtime resume of an LPSS controller waits the default 10 ms
d3hot_delayinpci_power_up()for theD3hot->D0transition. Nothing misbehaves, but the wait adds latency. On Arrow Lake-H (Lenovo Yoga Pro 7 14IAH10) the touchpad's I2C controller autosuspends after 1 s idle, and the i2c-hid interrupt handler for the first report afterwards takes 12.6-14.4 ms.[...]
Applied, thanks!
[1/1] mfd: intel-lpss: Set d3hot_delay to 0
commit: 51510cef4708652a074fc6a4344299a14f07ec98
--
Lee Jones [李琼斯]