[PATCH v2 2/2] firmware: arm_scmi: round rate bisecting in discrete rates
Etienne CARRIERE - foss
etienne.carriere at foss.st.com
Fri Dec 13 03:24:30 PST 2024
On Tuesday, December 10, 2024, Etienne CARRIERE - foss wrote:
> On Monday, December 9, 2024, Sudeep Holla wrote:
> > On Mon, Dec 09, 2024 at 12:59:58PM +0000, Etienne CARRIERE - foss wrote:
> (...)
> > > > I would like to avoid this extra query if not required which you seem to
> > > > have made an attempt but I just want to be thorough and make sure that's
> > > > what we need w.r.t the specification.
> > >
> > > Sure, I indeed prefer clear and robust implementation in the long term,
> > > being the one I propose here or another one.
> > >
> >
> > Good then, we can work towards achieving that. If you can specify how slow
> > or memory hungry is it without these changes and how much this change helps
> > your platform, we can take it up with spec authors and see if they are happy
> > to provide some alternative to deal with this in a generic way.
>
> The platforms we target usually have plenty of RAM, lets say hundreds of MBytes.
> Not that much for some system but enough I guess to store a few hundreds of
> clock rates for a few dozen of clocks (few kByte of RAM).
During last SCMI monthly meeting [1], there was a suggestion to use a lazy
query of the full clock discrete rates list: the first time clk_round_rate()
is requested on an SCMI clock with discrete rates, we can allocated and get
the full rate list once in struct scmi_clock_info. It will be ease to locally bisect
or scan into these supported rates for clk_round_rate() operations.
It would prevent to store the full discrete rates list for all SCMI clocks when
clk_round_rate() is queried only for a very few of them.
Do you think it would be a good compromise?
[1] https://linaro.atlassian.net/wiki/spaces/SCMI/overview#Meetings
BR,
Etienne
>
> That said, thinking more and more about this, I really belive a dedicate SCMI
> clock protocol command would better fit platform needs in the long term.
>
> BR,
> Etienne
>
> >
> > --
> > Regards,
> > Sudeep
> >
>
More information about the linux-arm-kernel
mailing list