From: David Dai <daidavid1@codeaurora.org>
To: Stephen Boyd <sboyd@kernel.org>, Alex Elder <elder@linaro.org>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: georgi.djakov@linaro.org, bjorn.andersson@linaro.org,
evgreen@google.com, tdas@codeaurora.org
Subject: Re: [RFC PATCH] clk: qcom: clk-rpmh: Add IPA clock support
Date: Wed, 5 Dec 2018 17:24:18 -0800 [thread overview]
Message-ID: <6ffdf6ca-51b5-a968-bb4e-c4d6d46f63aa@codeaurora.org> (raw)
In-Reply-To: <154399414865.88331.2447825064224349951@swboyd.mtv.corp.google.com>
On 12/4/2018 11:15 PM, Stephen Boyd wrote:
> Quoting David Dai (2018-12-04 17:14:10)
>> On 12/4/2018 2:34 PM, Stephen Boyd wrote:
>>> Quoting Alex Elder (2018-12-04 13:41:47)
>>>> On 12/4/18 1:24 PM, Stephen Boyd wrote:
>>>>> Quoting David Dai (2018-12-03 19:50:13)
>>>>>> Add IPA clock support by extending the current clk rpmh driver to support
>>>>>> clocks that are managed by a different type of RPMh resource known as
>>>>>> Bus Clock Manager(BCM).
>>>>> Yes, but why? Does the IPA driver need to set clk rates and that somehow
>>>>> doesn't work as a bandwidth request?
>>>> The IPA core clock is a *clock*, not a bus. Representing it as if
>>>> it were a bus, abusing the interconnect interface--pretending a bandwidth
>>>> request is really a clock rate request--is kind of kludgy. I think Bjorn
>>>> and David (and maybe Georgi? I don't know) decided a long time ago that
>>>> exposing this as a clock is the right way to do it. I agree with that.
>>>>
>>> But then we translate that clock rate into a bandwidth request to the
>>> BCM hardware? Seems really weird because it's doing the opposite of what
>>> you say is abusive. What does the IPA driver plan to do with this clk?
>>> Calculate a frequency by knowing that it really boils down to some
>>> bandwidth that then gets converted back into some clock frequency? Do we
>>> have the user somewhere that can be pointed to?
>> The clock rate is translated into a unitless threshold value sent as
>> part of the rpmh msg
>> that BCM takes to select a performance. In this case, the unit
>> conversion is based on
>> the unit value read from the aux data which is in Khz. I understand that
>> this wasn't
>> explicitly mentioned anywhere and I'll improve on that next patch.
> How is this different from bus bandwidth requests? In those cases the
> bandwidth is calculated in bits per second or something like that, and
> written to the hardware so it can convert that bandwidth into kHz and
> set a bus clk frequency in the clock controller? So in the IPA case
> we've skipped the bps to kHz conversion step and gone straight to the
> clk frequency setting part? Is a BCM able to aggregate units of
> bandwidth or kHz depending on how it's configured and this BCM is
> configured for kHz?
The data written to the hardware is just a 14bit scalar value that it
takes to select a performance/frequency from a preset table. It's not
really doing any sort of conversion in hardware in this case, instead
the value is computed by software based on the aux data given. Think of
it as a generic aggregator as opposed to being strictly bandwidth and
the aggregator itself does not care what type of value it is(be it Khz
or BW/s).
>
>> Here's a link to
>> the IPA driver implementation: https://lkml.org/lkml/2018/11/7/220
> Thanks for the link. It looks like the IPA driver hard codes a rate of
> 75 MHz.
>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2018-12-06 1:24 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-04 3:50 [RFC PATCH] Add IPA clock support for clk-rpmh David Dai
2018-12-04 3:50 ` [RFC PATCH] clk: qcom: clk-rpmh: Add IPA clock support David Dai
2018-12-04 19:24 ` Stephen Boyd
2018-12-04 21:41 ` Alex Elder
2018-12-04 22:34 ` Stephen Boyd
2018-12-05 1:14 ` David Dai
2018-12-05 7:15 ` Stephen Boyd
2018-12-06 1:24 ` David Dai [this message]
2018-12-06 18:02 ` Stephen Boyd
2018-12-06 7:33 ` Bjorn Andersson
2018-12-05 2:01 ` David Dai
2018-12-04 19:24 ` [RFC PATCH] Add IPA clock support for clk-rpmh Stephen Boyd
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=6ffdf6ca-51b5-a968-bb4e-c4d6d46f63aa@codeaurora.org \
--to=daidavid1@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=elder@linaro.org \
--cc=evgreen@google.com \
--cc=georgi.djakov@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sboyd@kernel.org \
--cc=tdas@codeaurora.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