Skip to contentSkip to conversation

accel/ivpu: Remove D3hot delay for Meteorlake

PATCH In review Stanislaw Gruszka 2 participants 2 messages Apr 3, 2023 – Apr 4, 2023

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v2 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 (PCIe r6.0, sec 5.9.) .

The delay removal is traditionally done by adding PCI ID to quirk_remove_d3hot_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_d3hot_delay() for that.

---
v2: improve commit log message

 drivers/accel/ivpu/ivpu_drv.c | 4 ++++
 1 file changed, 4 insertions(+)
drivers/accel/ivpu/ivpu_drv.c +4 -0
index 3be4a5a2b07a..cf9925c0a8ad 100644
@@ -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
Reviewed-by on v2 1/1
#1 lore raw
Quoted 13 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.) .

The delay removal is traditionally done by adding PCI ID to quirk_remove_d3hot_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_d3hot_delay() for that.

Quoted 2 lines