All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
To: Konrad Dybcio <konrad.dybcio@linaro.org>
Cc: Abel Vesa <abel.vesa@linaro.org>,
	lpieralisi@kernel.org, kw@linux.com, andersson@kernel.org,
	bhelgaas@google.com, linux-arm-msm@vger.kernel.org,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PCI: qcom: Add interconnect bandwidth for PCIe Gen4
Date: Wed, 27 Sep 2023 14:58:50 +0200	[thread overview]
Message-ID: <20230927125850.GA19623@thinkpad> (raw)
In-Reply-To: <09058de7-e207-414b-ab4c-88f0cbde9c22@linaro.org>

On Mon, Sep 25, 2023 at 12:40:34PM +0200, Konrad Dybcio wrote:
> On 25.09.2023 12:37, Abel Vesa wrote:
> > On 23-09-25 12:34:53, Konrad Dybcio wrote:
> >> On 25.09.2023 12:33, Abel Vesa wrote:
> >>> On 23-09-25 10:57:47, Konrad Dybcio wrote:
> >>>> On 24.09.2023 18:07, Manivannan Sadhasivam wrote:
> >>>>> PCIe Gen4 supports the interconnect bandwidth of 1969 MBps. So let's add
> >>>>> the bandwidth support in the driver. Otherwise, the default bandwidth of
> >>>>> 985 MBps will be used.
> >>>>>
> >>>>> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> >>>>> ---
> >>>>>  drivers/pci/controller/dwc/pcie-qcom.c | 7 +++++--
> >>>>>  1 file changed, 5 insertions(+), 2 deletions(-)
> >>>>>
> >>>>> diff --git a/drivers/pci/controller/dwc/pcie-qcom.c b/drivers/pci/controller/dwc/pcie-qcom.c
> >>>>> index 297442c969b6..6853123f92c1 100644
> >>>>> --- a/drivers/pci/controller/dwc/pcie-qcom.c
> >>>>> +++ b/drivers/pci/controller/dwc/pcie-qcom.c
> >>>>> @@ -1384,11 +1384,14 @@ static void qcom_pcie_icc_update(struct qcom_pcie *pcie)
> >>>>>  	case 2:
> >>>>>  		bw = MBps_to_icc(500);
> >>>>>  		break;
> >>>>> +	case 3:
> >>>>> +		bw = MBps_to_icc(985);
> >>>>> +		break;
> >>>>>  	default:
> >>>>>  		WARN_ON_ONCE(1);
> >>>>>  		fallthrough;
> >>>>> -	case 3:
> >>>>> -		bw = MBps_to_icc(985);
> >>>>> +	case 4:
> >>>>> +		bw = MBps_to_icc(1969);
> >>>>>  		break;
> >>>> Are you adding case 4 under `default`? That looks.. bizzare..
> >>>
> >>> That's intentional. You want it to use 1969MBps if there is a different
> >>> gen value. AFAIU.
> >> Gah right, then the commit message is wrong.
> > 
> > Yep, should be: "Otherwise, the default bandwidth of 1969 MBps will be
> > used."
> > 
> > But maybe we should not default to that. Maybe we should still default
> > to 985 MBps.
> Perhaps we shouldn't have a default at all..
> 
> E.g. if the gen5 bus may get clogged if we exceed gen4
> limits
> 

So the idea here is that if we happen to run this driver on a new Gen supported
SoC, we have to let the user know that the interconnects are running at a lower
gen speed and it needs attention.

But I think we can simplify it by fixing a default bandwidth, say Gen3 and get
rid of the fallthrough. And yeah, the same needs to be done for the pcie-qcom-ep
driver as well.

- Mani

> Konrad

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

  reply	other threads:[~2023-09-27 12:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-24 16:07 [PATCH] PCI: qcom: Add interconnect bandwidth for PCIe Gen4 Manivannan Sadhasivam
2023-09-25  8:57 ` Konrad Dybcio
2023-09-25 10:33   ` Abel Vesa
2023-09-25 10:34     ` Konrad Dybcio
2023-09-25 10:37       ` Abel Vesa
2023-09-25 10:40         ` Konrad Dybcio
2023-09-27 12:58           ` Manivannan Sadhasivam [this message]
2023-09-25 10:35 ` Abel Vesa
2023-09-26 21:08 ` Bjorn Helgaas
2023-09-27 13:04   ` Manivannan Sadhasivam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230927125850.GA19623@thinkpad \
    --to=manivannan.sadhasivam@linaro.org \
    --cc=abel.vesa@linaro.org \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.