]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
accel/ivpu: Remove D3hot delay for Meteorlake
authorKarol Wachowski <karol.wachowski@linux.intel.com>
Mon, 3 Apr 2023 12:15:45 +0000 (14:15 +0200)
committerJacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Wed, 5 Apr 2023 07:02:28 +0000 (09:02 +0200)
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.

Signed-off-by: Karol Wachowski <karol.wachowski@linux.intel.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
Reviewed-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Signed-off-by: Jacek Lawrynowicz <jacek.lawrynowicz@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230403121545.2995279-1-stanislaw.gruszka@linux.intel.com
drivers/accel/ivpu/ivpu_drv.c

index 231f29bb50257e9595f856e29cc312f937c33cb4..eb6405f9bf6b27879732680612b466b3c5c0f5a6 100644 (file)
@@ -433,6 +433,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);