]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
PCI: qcom: Update ICC and OPP values after Link Up event
authorKrishna chaitanya chundru <quic_krichai@quicinc.com>
Fri, 22 Nov 2024 19:10:01 +0000 (00:40 +0530)
committerBjorn Helgaas <bhelgaas@google.com>
Sat, 18 Jan 2025 17:35:18 +0000 (11:35 -0600)
4581403f6792 ("PCI: qcom: Enumerate endpoints based on Link up event in
'global_irq' interrupt") added the Link Up-based enumeration support, but
did not update the ICC/OPP vote once link is up. Before that, the update
happened during probe and the endpoints may or may not be enumerated at
that time, so the ICC/OPP vote was not guaranteed to be accurate.

With Link Up-based enumeration support, the driver can request the accurate
vote based on the PCIe link.

Call qcom_pcie_icc_opp_update() in qcom_pcie_global_irq_thread() after
enumerating the endpoints.

Fixes: 4581403f6792 ("PCI: qcom: Enumerate endpoints based on Link up event in 'global_irq' interrupt")
Link: https://lore.kernel.org/r/20241123-remove_wait2-v5-3-b5f9e6b794c2@quicinc.com
Signed-off-by: Krishna chaitanya chundru <quic_krichai@quicinc.com>
[kwilczynski: commit log]
Signed-off-by: Krzysztof WilczyƄski <kwilczynski@kernel.org>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Niklas Cassel <cassel@kernel.org>
drivers/pci/controller/dwc/pcie-qcom.c

index 656d2be9d87feb4d5ac6a8160004932bae1209cd..e4d3366ead1f9198693e6f9da4ae1dc40a3a0519 100644 (file)
@@ -1569,6 +1569,8 @@ static irqreturn_t qcom_pcie_global_irq_thread(int irq, void *data)
                pci_lock_rescan_remove();
                pci_rescan_bus(pp->bridge->bus);
                pci_unlock_rescan_remove();
+
+               qcom_pcie_icc_opp_update(pcie);
        } else {
                dev_WARN_ONCE(dev, 1, "Received unknown event. INT_STATUS: 0x%08x\n",
                              status);