Re: [PATCH] PCI: qcom: Set max OPP before DBI access during resume
From: Konrad Dybcio
Date: Fri Apr 17 2026 - 04:25:59 EST
On 4/17/26 6:16 AM, Qiang Yu wrote:
> During resume, qcom_pcie_icc_opp_update() may access DBI registers before
> the OPP votes are restored, which can trigger NoC errors.
>
> Set the PCIe controller to the maximum OPP first in resume_noirq(), then
> proceed with link/DBI accesses. The OPP is later updated again based on
> the actual link bandwidth requirements.
>
> Also introduce a small helper to reuse the max-OPP setup path shared with
> probe.
>
> Fixes: 5b6272e0efd5 ("PCI: qcom: Add OPP support to scale performance")
> Signed-off-by: Qiang Yu <qiang.yu@xxxxxxxxxxxxxxxx>
> ---
> drivers/pci/controller/dwc/pcie-qcom.c | 42 +++++++++++++++++++++-------------
> 1 file changed, 26 insertions(+), 16 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> index 9fdfc88ac15120b2b01cad746772ae612a2c9690..c9b201a1c033a9849e97db9ee4d07d26655d5a6c 100644
> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> @@ -1613,6 +1613,22 @@ static void qcom_pcie_icc_opp_update(struct qcom_pcie *pcie)
> }
> }
>
> +static int qcom_pcie_set_max_opp(struct device *dev)
Can this be a small non-zero vote instead?
Konrad