2023-09-28 10:41:53

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH v5 5/5] PCI: qcom: Add OPP support to scale performance state of power domain

Adding everyone back, reply to you only by mistake earlier :(

On 28-09-23, 08:53, Krishna Chaitanya Chundru wrote:
>
> On 9/27/2023 12:23 PM, Viresh Kumar wrote:
> > On 07-09-23, 11:30, Krishna chaitanya chundru wrote:
> > > While scaling the interconnect clocks based on PCIe link speed, it is also
> > > mandatory to scale the power domain performance state so that the SoC can
> > > run under optimum power conditions.
> > Why aren't you scaling interconnect bw via OPP core too ?
>
> The power domain performance state varies from PCIe instance to instance and
> from target to target,
>
> whereas interconnect BW remains same and changes only based upon PCIe GEN
> speed. So in the driver code itself
>
> based upon GEN speed we are calculating the BW and voting for it.
>
> That is the reason we are not scaling interconnect BW through OPP as no dt
> entries required for this.

Not sure I understand it fully yet. I tried looking at code and this is what I
see:

At probe initialization, you just configure bw.

Later on, towards end of probe and resume, you set both bw and performance
state.

Also your DT changes add virtual level numbers to PCIe OPP table like this:
+ opp-1 {
+ opp-level = <1>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };

Instead what you can do here is, add bw values and remove level completely (as
it is not serving any meaningful purpose) and use the OPP core to set both bw
and performance state (via required OPPs).

What won't work if you do this ?

--
viresh