Re: [PATCH] PCI: qcom: Set max OPP before DBI access during resume

From: Manivannan Sadhasivam

Date: Fri Apr 17 2026 - 05:48:22 EST


On Fri, Apr 17, 2026 at 10:18:44AM +0200, Konrad Dybcio wrote:
> 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?
>

It won't make a difference. We are going to update the vote right after it.
Furthermore, it will allow us to group the logic into one helper and call from
both probe() and resume().

- Mani

--
மணிவண்ணன் சதாசிவம்