Re: [PATCH 1/2] OPP: Use _set_opp_level() for single genpd case

Viresh Kumar
2023-11-06T07:08:38Z

On 03-11-23, 12:58, Ulf Hansson wrote:
> Are you saying that the OPP library should be capable of managing the
> parent-clock-rates too, when there is a new rate being requested for a
> clock that belongs to an OPP? To me, that sounds like replicating
> framework specific knowledge into the OPP library, no? Why do we want
> this?

I am surely not touching clocks or any other framework :)

> Unless I totally misunderstood your suggestion, I think it would be
> better if the OPP library remained simple and didn't run recursive
> calls, but instead relied on each framework to manage the aggregation
> and propagation to parents.

I see your point and agree with it.

Here is the problem and I am not very sure what's the way forward for this then:

- Devices can have other devices (like caches) or genpds mentioned via
required-opps.

- Same is true for genpds, they can also have required-opps, which may or may not
be other genpds.

- When OPP core is asked to set a device's OPP, it isn't only about performance
level, but clk, level, regulator, bw, etc. And so a full call to
dev_pm_opp_set_opp() is required.

- The OPP core is going to run the helper recursively only for required-opps and
hence it won't affect clock or regulators.

- But it currently affects genpds as they are mentioned in required-opps.

- Skipping the recursive call to a parent genpd will require a special hack,
maybe we should add it, I am just discussing it if we should or if there is
another way around this.

--
viresh