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

From: Konrad Dybcio
Date: Mon May 29 2023 - 05:35:13 EST




On 29.05.2023 06:58, Viresh Kumar wrote:
> On 26-05-23, 12:59, Konrad Dybcio wrote:
>> There are some users which have tight power sequencing requirements,
>> like the Qualcomm Adreno GPU.
>>
>> Dropping the entire OPP kills clocks, bw and required-opps at once,
>> but on certain Adrenos we need something like:
>>
>>
>> disable memory clock (clk)
>> disable all other clocks, including the opp-managed core clock (clk_bulk)
>> kill one, fully manually controlled genpd (manual runtime pm)
>> remove bus vote (func proposed in this patch)
>> kill another genpd (manual runtime pm)
>> kill the opp-managed genpd (automatic pm calls)
>>
>> Changing the order kills the chip until you reboot the whole board and
>> setting freq=0 using dev_pm_opp_set_rate doesn't drop the bw vote.
>
> I am a bit confused now.
>
> What's the exact problem with dev_pm_opp_set_rate(dev, 0) ? It does set the
> bandwidth too, from what I can see.
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(...)
}

but since OPP already picked up these interconnect paths, it makes
little sense to mess with them through raw APIs.

Konrad
>