linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Gerhold <stephan@gerhold.net>
To: Stephen Boyd <swboyd@chromium.org>,
	Rajendra Nayak <rnayak@codeaurora.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Georgi Djakov <georgi.djakov@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
	linux-clk@vger.kernel.org
Subject: Qcom clock performance votes on mainline
Date: Thu, 10 Sep 2020 18:26:10 +0200	[thread overview]
Message-ID: <20200910162610.GA7008@gerhold.net> (raw)

Hi Stephen, Hi Rajendra,

while working on some MSM8916 things I've been staring at the downstream
clock-gcc-8916.c [1] driver a bit. One thing that confuses me are the
voltage/performance state votes that are made for certain clocks within
the driver. Specifically lines like

    VDD_DIG_FMAX_MAP2(LOW, 32000000, NOMINAL, 64000000),

on certain clocks like UART, I2C or SPI. There does not seem to be
anything equivalent in the mainline clock driver at the moment.

As far as I understand from related discussions on mailing lists [2],
these performance votes are not supposed to be added to the clock
driver(s), but rather as required-opps within OPP tables of all the
consumers. Is that correct?

As a second question, I'm wondering about one particular case:
I've been trying to get CPR / all the CPU frequencies working on MSM8916.
For that, I already added performance state votes for VDDMX and CPR as
required-opps to the CPU OPP table.

After a recent discussion [3] with Viresh about where to enable power
domains managed by the OPP core, I've been looking at all the
performance state votes made in the downstream kernel again.

Actually, the A53 PLL used for the higher CPU frequencies also has such
voltage/performance state votes. The downstream driver declares the
clock like [4]:

		.vdd_class = &vdd_sr2_pll,
		.fmax = (unsigned long [VDD_SR2_PLL_NUM]) {
			[VDD_SR2_PLL_SVS] = 1000000000,
			[VDD_SR2_PLL_NOM] = 1900000000,
		},
		.num_fmax = VDD_SR2_PLL_NUM,

which ends up as votes for the VDDCX power domain.

Now I'm wondering: Where should I make these votes on mainline?
Should I add it as yet another required-opps to the CPU OPP table?

It would be a bit of a special case because these votes are only done
for the A53 PLL (which is only used for the higher CPU frequencies, not
the lower ones)...

Thanks in advance!
Stephan

[1]: https://source.codeaurora.org/quic/la/kernel/msm-3.10/tree/drivers/clk/qcom/clock-gcc-8916.c?h=LA.BR.1.2.9.1-02310-8x16.0
[2]: https://lore.kernel.org/linux-arm-msm/20190129015547.213276-1-swboyd@chromium.org/
[3]: https://lore.kernel.org/linux-pm/20200826093328.88268-1-stephan@gerhold.net/
[4]: https://source.codeaurora.org/quic/la/kernel/msm-3.10/tree/drivers/clk/qcom/clock-gcc-8916.c?h=LA.BR.1.2.9.1-02310-8x16.0#n354

             reply	other threads:[~2020-09-10 16:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 16:26 Stephan Gerhold [this message]
2020-09-10 21:28 ` Qcom clock performance votes on mainline Stephen Boyd
2020-09-11  5:48   ` Stephan Gerhold
2020-09-11  6:05     ` Viresh Kumar
2020-09-11  6:26       ` Stephan Gerhold

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=20200910162610.GA7008@gerhold.net \
    --to=stephan@gerhold.net \
    --cc=georgi.djakov@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rnayak@codeaurora.org \
    --cc=swboyd@chromium.org \
    --cc=ulf.hansson@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /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).