mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jon Hunter <jonathanh@nvidia.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] cpufreq: tegra186: Fix initial frequency
Date: Mon, 13 Jul 2020 17:37:36 +0100	[thread overview]
Message-ID: <3d6091f2-6b04-185f-6c23-e39a34b87877@nvidia.com> (raw)
In-Reply-To: <20200713032554.cykywnygxln6ukrl@vireshk-i7>


On 13/07/2020 04:25, Viresh Kumar wrote:
> On 12-07-20, 11:06, Jon Hunter wrote:
>> Commit 6cc3d0e9a097 ("cpufreq: tegra186: add
>> CPUFREQ_NEED_INITIAL_FREQ_CHECK flag") fixed CPUFREQ support for
>> Tegra186 but as a consequence the following warnings are now seen on
>> boot ...
>>
>>  cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 0 KHz
>>  cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 2035200 KHz
>>  cpufreq: cpufreq_online: CPU1: Running at unlisted freq: 0 KHz
>>  cpufreq: cpufreq_online: CPU1: Unlisted initial frequency changed to: 2035200 KHz
>>  cpufreq: cpufreq_online: CPU2: Running at unlisted freq: 0 KHz
>>  cpufreq: cpufreq_online: CPU2: Unlisted initial frequency changed to: 2035200 KHz
>>  cpufreq: cpufreq_online: CPU3: Running at unlisted freq: 0 KHz
>>  cpufreq: cpufreq_online: CPU3: Unlisted initial frequency changed to: 2035200 KHz
>>  cpufreq: cpufreq_online: CPU4: Running at unlisted freq: 0 KHz
>>  cpufreq: cpufreq_online: CPU4: Unlisted initial frequency changed to: 2035200 KHz
>>  cpufreq: cpufreq_online: CPU5: Running at unlisted freq: 0 KHz
>>  cpufreq: cpufreq_online: CPU5: Unlisted initial frequency changed to: 2035200 KHz
>>
>> Although we could fix this by adding a 'get' operator for the Tegra186
>> CPUFREQ driver, there is really little point because the CPUFREQ on
>> Tegra186 is set by writing a value stored in the frequency table to a
>> register and we just need to set the initial frequency.
> 
> The hardware still runs at the frequency requested by cpufreq core here, right ?

Yes.

> It is better to provide the get() callback as it is also used to show the
> current frequency in userspace.

I looked at that and I saw that if the get() callback is not provided,
the current frequency showed by userspace is policy->cur. For this
device, policy->cur is accurate and so if we added the get() callback we
essentially just going to return policy->cur. Therefore, given that we
already know policy->cur, I did not see the point in adding a device
specific handler to do the same thing.

Cheers
Jon

-- 
nvpublic

  reply	other threads:[~2020-07-13 16:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-12 10:06 Jon Hunter
2020-07-12 10:06 ` [PATCH 2/2] cpufreq: tegra186: Simplify probe return path Jon Hunter
2020-07-13  3:28   ` Viresh Kumar
2020-07-13  3:25 ` [PATCH 1/2] cpufreq: tegra186: Fix initial frequency Viresh Kumar
2020-07-13 16:37   ` Jon Hunter [this message]
2020-07-14  3:46     ` Viresh Kumar
2020-07-14  7:26       ` Jon Hunter
2020-07-14  7:31         ` Viresh Kumar
2020-07-31 12:14       ` Jon Hunter
2020-08-04  5:25         ` 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=3d6091f2-6b04-185f-6c23-e39a34b87877@nvidia.com \
    --to=jonathanh@nvidia.com \
    --cc=linux-kernel@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®