All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
	Dmitry Osipenko <digetx@gmail.com>
Cc: Keerthy <j-keerthy@ti.com>, Dave Gerlach <d-gerlach@ti.com>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	linux-kernel@vger.kernel.org,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>
Subject: Re: [PATCH 5/5] OPP: Remove custom OPP helper support
Date: Tue, 28 Jun 2022 13:04:01 +0300	[thread overview]
Message-ID: <d2a8c329-4469-f68a-5b4b-789a93725ea4@collabora.com> (raw)
In-Reply-To: <20220627071937.uneeudaqzo2aa2me@vireshk-i7>

On 6/27/22 10:19, Viresh Kumar wrote:
> On 27-06-22, 10:09, Dmitry Osipenko wrote:
>> Yes, I missed that multi-clock OPP patch, thanks.
>>
>> Seems _opp_compare_key() won't work properly for the multi-clocks since
>> Tegra doesn't have bandwidth nor level for the 3d OPPs. Why does it need
>> to check opp_table->clk_count == 1? Shouldn't it be opp_table->clk_count
>>> 0?
> 
> The problem is that when we have multiple clocks, we can't assume any
> of them as primary. Its the combination of the clock frequencies that
> make them unique. Otherwise, what will happen if we have same
> frequency of the first clock in two OPPs, but different frequency of
> the second clock.
> 
> Because of this, we won't also support multiple clocks in all freq
> finder APIs, like dev_pm_opp_find_freq_exact(). We can't do that from
> just one frequency.
> 
> Ideally, the drivers should now be calling dev_pm_opp_set_opp() to set
> the OPP now.
> 
> For your case, I think you can just add levels (like index) in the OPP
> table. So we can uniquely identify each OPP.
> 

What about to bump the "by-level" sorting priority, making it above the
"by-rate" sorting and then always use the first clock for the "by-rate"
sorting? Then the multi-clock will work for Tegra without breaking dtbs
and those for whom this sorting option won't be appropriate will have to
add levels to the DT.

-- 
Best regards,
Dmitry

  reply	other threads:[~2022-06-28 10:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-31 10:09 [PATCH 0/5] OPP: Replace custom set_opp() with config_regulators() Viresh Kumar
2022-05-31 10:10 ` [PATCH 1/5] OPP: Add support for config_regulators() helper Viresh Kumar
2022-05-31 10:10 ` [PATCH 2/5] OPP: Make _generic_set_opp_regulator() a config_regulators() interface Viresh Kumar
2022-05-31 10:10 ` [PATCH 3/5] OPP: Add dev_pm_opp_get_supplies() Viresh Kumar
2022-05-31 10:10 ` [PATCH 4/5] OPP: ti: Migrate to config_regulators() Viresh Kumar
2022-05-31 10:10 ` [PATCH 5/5] OPP: Remove custom OPP helper support Viresh Kumar
2022-06-25 11:42   ` Dmitry Osipenko
2022-06-27  6:06     ` Viresh Kumar
2022-06-27  6:10       ` Dmitry Osipenko
2022-06-27  6:41         ` Viresh Kumar
2022-06-27  7:09           ` Dmitry Osipenko
2022-06-27  7:19             ` Viresh Kumar
2022-06-28 10:04               ` Dmitry Osipenko [this message]
2022-06-28 11:04                 ` 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=d2a8c329-4469-f68a-5b4b-789a93725ea4@collabora.com \
    --to=dmitry.osipenko@collabora.com \
    --cc=d-gerlach@ti.com \
    --cc=digetx@gmail.com \
    --cc=j-keerthy@ti.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=thierry.reding@gmail.com \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@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.