From: Etienne CARRIERE - foss <etienne.carriere@foss.st.com>
To: Sudeep Holla <sudeep.holla@arm.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Cristian Marussi" <cristian.marussi@arm.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
"arm-scmi@vger.kernel.org" <arm-scmi@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-clk@vger.kernel.org" <linux-clk@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] firmware: arm_scmi: get only min/max clock rates
Date: Mon, 9 Dec 2024 13:48:48 +0000 [thread overview]
Message-ID: <22ff786d1e034169be21ef7dc32c4a3a@foss.st.com> (raw)
In-Reply-To: <Z1bHgf_4qqZgSnDt@bogus>
On Monday, December 9, 2024, Sudeep Holla wrote:
> On Tue, Dec 03, 2024 at 06:39:07PM +0100, Etienne Carriere wrote:
> > Remove limitation of 16 clock rates max for discrete clock rates
> > description when the SCMI firmware supports SCMI Clock protocol v2.0
> > or later.
> >
> > Driver clk-scmi.c is only interested in the min and max clock rates.
> > Get these by querying the first and last discrete rates with SCMI
> > clock protocol message ID CLOCK_DESCRIBE_RATES since the SCMI
> > specification v2.0 and later states that rates enumerated by this
> > command are to be enumerated in "numeric ascending order" [1].
> >
> > Preserve the implementation that queries all discrete rates (16 rates
> > max) to support SCMI firmware built on SCMI specification v1.0 [2]
> > where SCMI Clock protocol v1.0 does not explicitly require rates
> > described with CLOCK_DESCRIBE_RATES to be in ascending order.
> >
> > Link: https://developer.arm.com/documentation/den0056 [1]
> > Link: https://developer.arm.com/documentation/den0056/a [2]
> > Signed-off-by: Etienne Carriere <etienne.carriere@foss.st.com>
> > ---
>
> [...]
>
> > +
> > +static int scmi_clock_get_rates_bound(const struct scmi_protocol_handle *ph,
> > + u32 clk_id, struct scmi_clock_info *clk)
> > +{
>
> This new function seem to have unwraped the scmi_iterator_ops(namely
> prepare_message, update_state and process_response instead of reusing them.
> Can you please explain why it wasn't possible to reuse them ?
Since we're interested here only in min and max rates, let's query the
first and last rates only. This can save a bit of useless transactions between
agent and firmware in case there are many clocks with somewhat large
the discrete rate lists.
I though using the iterator for this specific case would add a bit more
complexity: it's expected to iterate (st->desc_index incremented from the
common scmi_iterator_run() function) whereas here I propose to send
only 2 messages.
BR,
Etienne
>
> --
> Regards,
> Sudeep
>
next prev parent reply other threads:[~2024-12-09 13:58 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 17:39 [PATCH v2 0/2] firmware: arm_scmi: unbound discrete rates, support round rate Etienne Carriere
2024-12-03 17:39 ` [PATCH v2 1/2] firmware: arm_scmi: get only min/max clock rates Etienne Carriere
2024-12-09 10:33 ` Sudeep Holla
2024-12-09 13:48 ` Etienne CARRIERE - foss [this message]
2024-12-09 18:01 ` Cristian Marussi
2024-12-10 10:58 ` Etienne CARRIERE - foss
2024-12-03 17:39 ` [PATCH v2 2/2] firmware: arm_scmi: round rate bisecting in discrete rates Etienne Carriere
2024-12-06 20:28 ` Dan Carpenter
2024-12-09 8:16 ` Etienne CARRIERE - foss
2024-12-09 9:12 ` Dan Carpenter
2024-12-09 10:46 ` Sudeep Holla
2024-12-09 12:59 ` Etienne CARRIERE - foss
2024-12-09 17:12 ` Sudeep Holla
2024-12-10 10:52 ` Etienne CARRIERE - foss
2024-12-13 11:24 ` Etienne CARRIERE - foss
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22ff786d1e034169be21ef7dc32c4a3a@foss.st.com \
--to=etienne.carriere@foss.st.com \
--cc=arm-scmi@vger.kernel.org \
--cc=cristian.marussi@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
--cc=sudeep.holla@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).