From: Jon Hunter <jonathanh@nvidia.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J . Wysocki" <rjw@rjwysocki.net>,
Thierry Reding <thierry.reding@gmail.com>,
<linux-pm@vger.kernel.org>, <linux-tegra@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH V2] cpufreq: tegra186: Fix initial frequency
Date: Wed, 28 Oct 2020 12:31:28 +0000 [thread overview]
Message-ID: <382ba642-dbea-c36a-0c71-6e91ccb7b775@nvidia.com> (raw)
In-Reply-To: <20201028041152.733tkghz4vnqz2io@vireshk-i7>
On 28/10/2020 04:11, Viresh Kumar wrote:
> On 26-10-20, 12:57, Jon Hunter wrote:
>> Thinking about this some more, what are your thoughts on making the
>> following change?
>>
>> Basically, if the driver sets the CPUFREQ_NEED_INITIAL_FREQ_CHECK,
>
> This flag only means that the platform would like the core to check
> the currently programmed frequency and get it in sync with the table.
Yes exactly.
>> then I wonder if we should not fail if the frequency return by
>>> get() is not known.
>
> When do we fail if the frequency isn't known ? That's the case where
> we try to set it to one from the table.
Currently, if the frequency is not known, we fail right before we do the
initial frequency check [0].
> But (looking at your change), ->get() can't really return 0. We depend
> on it to get us the exact frequency the hardware is programmed at
> instead of reading a cached value in the software.
Actually it can and it does currently. Note in tegra186_cpufreq_get()
the variable 'freq' is initialised to 0, and if no match is found, then
it returns 0. This is what happens currently on some Tegra186 boards.
>>> This would fix the problem I see on Tegra186
>> where the initial boot frequency may not be in the frequency table.
>
> With current mainline, what's the problem you see now ? Sorry I missed
> track of it a bit :)
No problem, this has been an on-going saga now for sometime.
Cheers
Jon
[0]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/cpufreq.c#n1429
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/cpufreq/tegra186-cpufreq.c#n95
--
nvpublic
next prev parent reply other threads:[~2020-10-28 22:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 14:59 Jon Hunter
2020-08-25 5:50 ` Viresh Kumar
2020-08-25 8:22 ` Jon Hunter
2020-10-15 14:03 ` Jon Hunter
2020-10-16 4:07 ` Viresh Kumar
2020-10-19 9:33 ` Jon Hunter
2020-10-26 12:57 ` Jon Hunter
2020-10-28 4:11 ` Viresh Kumar
2020-10-28 12:31 ` Jon Hunter [this message]
2020-10-28 14:52 ` Viresh Kumar
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=382ba642-dbea-c36a-0c71-6e91ccb7b775@nvidia.com \
--to=jonathanh@nvidia.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=thierry.reding@gmail.com \
--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
all inboxes | Powered by JetHome®