accel/ivpu: Remove D3hot delay for Meteorlake
PATCH 1/1 accel/ivpu: Remove D3hot delay for Meteorlake
From: Karol Wachowski <[email protected]>
VPU on MTL has hardware optimizations and does not require 10ms D0 - D3hot transition delay imposed by PCI specification.
The delay removal is traditionally done by adding PCI ID to quirk_remove_dhot_delay() in drivers/pci/quirks.c . But since we do not need that optimization before driver probe and we can better specify in the ivpu driver on what (future) hardware use the optimization, we do not use quirk_remove_dhot_delay() for that.
--- drivers/accel/ivpu/ivpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/accel/ivpu/ivpu_drv.c +4 -0
@@ -442,6 +442,10 @@ static int ivpu_pci_init(struct ivpu_device *vdev)/* Clear any pending errors */ pcie_capability_clear_word (pdev,PCI_EXP_DEVSTA ,0x3f ); +/* VPU MTL does not require PCI spec 10m D3hot delay */ +if (ivpu_is_mtl (vdev)) + pdev->d3hot_delay =0 ; + ret =pcim_enable_device (pdev);if (ret) {ivpu_err (vdev,"Failed to enable PCI device: %d\n" , ret);
Signature · 1 line
2.25.1
Quoted 4 lines · Stanislaw Gruszka
From: Karol Wachowski <[email protected]>
VPU on MTL has hardware optimizations and does not require 10ms D0 - D3hot transition delay imposed by PCI specification.
PCIe r6.0, sec 5.9.
Quoted 2 lines
The delay removal is traditionally done by adding PCI ID to
quirk_remove_dhot_delay()indrivers/pci/quirks.c. But since
quirk_remove_d3hot_delay()
Quoted 3 lines
we do not need that optimization before driver probe and we can better specify in the ivpu driver on what (future) hardware use the optimization, we do not use
quirk_remove_dhot_delay()
Again.
Quoted 13 lines
for that.
Signed-off-by Karol Wachowski <[email protected]>Signed-off-by Stanislaw Gruszka <[email protected]>--- drivers/accel/ivpu/ivpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/accel/ivpu/ivpu_drv.c +0
-0
drivers/accel/ivpu/ivpu_drv.c static int ivpu_pci_init(struct ivpu_device *vdev) · line 447
Quoted 6 lines
drivers/accel/ivpu/ivpu_drv.c +3
-0@@ -442,6 +442,10 @@ static int ivpu_pci_init(struct ivpu_device *vdev)/* Clear any pending errors */ pcie_capability_clear_word (pdev,PCI_EXP_DEVSTA ,0x3f ); +/* VPU MTL does not require PCI spec 10m D3hot delay */ +if (ivpu_is_mtl (vdev)) + pdev->d3hot_delay =0 ;
d3hot_delay is used after a D0->D3hot transition, after a D3hot->D0 transition, and after the D0->D3hot and D3hot->D0 transitions in pci_pm_reset().
I assume this device can tolerate removing *all* of those delays, right?
Quoted 6 lines
drivers/accel/ivpu/ivpu_drv.c +0
-0ret =pcim_enable_device (pdev);if (ret) {ivpu_err (vdev,"Failed to enable PCI device: %d\n" , ret);Signature · 1 line
2.25.1
Quoted 11 lines · Bjorn Helgaas
Quoted 4 lines · Stanislaw Gruszka
From: Karol Wachowski <[email protected]>
VPU on MTL has hardware optimizations and does not require 10ms D0 - D3hot transition delay imposed by PCI specification.
PCIe r6.0, sec 5.9.
Quoted 2 lines
The delay removal is traditionally done by adding PCI ID to
quirk_remove_dhot_delay()indrivers/pci/quirks.c. But since
Quoted 7 lines
quirk_remove_d3hot_delay()Quoted 3 lines
we do not need that optimization before driver probe and we can better specify in the ivpu driver on what (future) hardware use the optimization, we do not use
quirk_remove_dhot_delay()Again.
I Will fix the commit message in v2.
Quoted 24 lines
Quoted 13 lines
for that.
Signed-off-by Karol Wachowski <[email protected]>Signed-off-by Stanislaw Gruszka <[email protected]>--- drivers/accel/ivpu/ivpu_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/accel/ivpu/ivpu_drv.c +0
-0drivers/accel/ivpu/ivpu_drv.c static int ivpu_pci_init(struct ivpu_device *vdev) · line 447
Quoted 6 lines
drivers/accel/ivpu/ivpu_drv.c +3
-0@@ -442,6 +442,10 @@ static int ivpu_pci_init(struct ivpu_device *vdev)/* Clear any pending errors */ pcie_capability_clear_word (pdev,PCI_EXP_DEVSTA ,0x3f ); +/* VPU MTL does not require PCI spec 10m D3hot delay */ +if (ivpu_is_mtl (vdev)) + pdev->d3hot_delay =0 ;
d3hot_delayis used after aD0->D3hottransition, after aD3hot->D0transition, and after theD0->D3hotandD3hot->D0transitions inpci_pm_reset().
Quoted 2 lines
I assume this device can tolerate removing *all* of those delays, right?
Yes.
Regards
Stanislaw