All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Cc: Jon Hunter <jonathanh@nvidia.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	linux-kernel@vger.kernel.org,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 5/8] OPP: Allow multiple clocks for a device
Date: Thu, 30 Jun 2022 15:22:45 +0530	[thread overview]
Message-ID: <20220630095245.otvo53ezd4avoujw@vireshk-i7> (raw)
In-Reply-To: <8367c38b-8cd3-cde1-5833-874769ef3350@collabora.com>

On 30-06-22, 12:13, Dmitry Osipenko wrote:
> On 6/30/22 03:50, Viresh Kumar wrote:
> > On 29-06-22, 21:33, Dmitry Osipenko wrote:
> >> Today I noticed that tegra30-devfreq driver now fails to probe because
> >> dev_pm_opp_find_freq_ceil() fails with -ERANGE. This patch is guilty for
> >> that. Could you please take a look?
 
> We added memory interconnect support to Tegra and since that time only
> the memory controller can drive the clock rate. All other drivers,
> including the devfreq, now issue memory bandwidth requests using ICC.
> 
> In case of the devfreq driver, it's the OPP core that makes the bw
> request using ICC.
> 
> But it's the set_freq_table() that fails [2], I see
> dev_pm_opp_get_opp_count() returns 17, which is correct, and then
> dev_pm_opp_find_freq_ceil(freq=0) returns freq=1, which shall be
> freq=12750000.

I am confused, you said earlier that it is failing with -ERANGE, but
now it is a bad freq value ?

Which one of these it is ?

The problem I see is here though, because of which I was asking you
the question earlier:

- tegra30-devfreq driver calls devm_pm_opp_of_add_table_noclk(), i.e.
  clk_count == 0.

- _read_rate() (in drivers/opp/of.c) skips reading any opp-hz
  properties if clk_count is 0.

- And so you can get -ERANGE or some other error.

Can you please see where we are failing. Also I don't see how freq can
get set to 1 currently.

-- 
viresh

  reply	other threads:[~2022-06-30  9:52 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10  8:20 [PATCH 0/8] OPP: Add support for multiple clocks Viresh Kumar
2022-06-10  8:20 ` [PATCH 1/8] OPP: Use consistent names for OPP table instances Viresh Kumar
2022-06-10  8:20 ` [PATCH 2/8] OPP: Remove rate_not_available parameter to _opp_add() Viresh Kumar
2022-06-10  8:20 ` [PATCH 3/8] OPP: Reuse _opp_compare_key() in _opp_add_static_v2() Viresh Kumar
2022-06-22 13:58   ` Jon Hunter
2022-06-22 14:07     ` Viresh Kumar
2022-06-10  8:20 ` [PATCH 4/8] OPP: Make dev_pm_opp_set_opp() independent of frequency Viresh Kumar
2022-06-10  8:20 ` [PATCH 5/8] OPP: Allow multiple clocks for a device Viresh Kumar
2022-06-13  8:07   ` Viresh Kumar
2022-06-22 13:47   ` Jon Hunter
2022-06-22 14:15     ` Viresh Kumar
2022-06-22 15:27       ` Jon Hunter
2022-06-29 18:33         ` Dmitry Osipenko
2022-06-30  0:50           ` Viresh Kumar
2022-06-30  9:13             ` Dmitry Osipenko
2022-06-30  9:52               ` Viresh Kumar [this message]
2022-06-30  9:57                 ` Dmitry Osipenko
2022-06-30 10:15                   ` Viresh Kumar
2022-07-04 12:09                     ` Viresh Kumar
2022-07-04 13:17                       ` Dmitry Osipenko
2022-07-04 15:52                         ` Viresh Kumar
2022-07-04 18:04                           ` Dmitry Osipenko
2022-07-05  4:08                             ` Viresh Kumar
2022-06-30  8:38   ` Krzysztof Kozlowski
2022-06-30  9:39     ` Viresh Kumar
2022-06-30 12:32   ` Krzysztof Kozlowski
2022-06-30 12:39     ` Krzysztof Kozlowski
2022-07-01  6:47       ` Viresh Kumar
2022-07-05  6:59       ` Viresh Kumar
2022-07-05  8:18         ` Krzysztof Kozlowski
2022-07-05  8:40           ` Viresh Kumar
2022-06-10  8:20 ` [PATCH 6/8] OPP: Add key specific assert() method to key finding helpers Viresh Kumar
2022-06-10  8:20 ` [PATCH 7/8] OPP: Assert clk_count == 1 for single clk helpers Viresh Kumar
2022-06-10  8:20 ` [PATCH 8/8] OPP: Provide a simple implementation to configure multiple clocks 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=20220630095245.otvo53ezd4avoujw@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=dmitry.osipenko@collabora.com \
    --cc=jonathanh@nvidia.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rafael@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=vireshk@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.