Re: [PATCH] opp: Provide a function for just setting bandwidth

From: Konrad Dybcio
Date: Mon May 29 2023 - 07:39:02 EST




On 29.05.2023 11:40, Viresh Kumar wrote:
> On 29-05-23, 11:35, Konrad Dybcio wrote:
>> I think I didn't state my intentions correctly..
>>
>> The proposed function would set *just* the bandwidth through OPP,
>> so it'd be essentially equal to
>>
>> loop over num_paths {
>> icc_get(...)
>>
>> icc_set(...)
>>
>> icc_put(...)
>> }
>
> Right, but why do you need to do it ? Why isn't this done as part of
> dev_pm_opp_set_{freq|opp}() ?
>
>> but since OPP already picked up these interconnect paths, it makes
>> little sense to mess with them through raw APIs.
>
> I am not sure if I would want to expose an API to just configure part of the
> entire OPP switching mechanism. I would rather let you do that via ICC APIs,
> instead of going through the OPP core. Since there is a possibility of
> accidental misuse of the same here.
I did some more testing and I think that I was just trying to abuse
the APIs.. Adding power-domains + pm calls + required-opps to the genpd
provider made the set_opp func work fine on suspend.. Consider this
solved!

Konrad
>