<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/opp, branch v5.10</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.10</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.10'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2020-10-27T07:51:03Z</updated>
<entry>
<title>opp: Reduce the size of critical section in _opp_table_kref_release()</title>
<updated>2020-10-27T07:51:03Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-10-22T06:56:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e0df59de670b48a923246fae1f972317b84b2764'/>
<id>urn:sha1:e0df59de670b48a923246fae1f972317b84b2764</id>
<content type='text'>
There is a lot of stuff here which can be done outside of the big
opp_table_lock, do that. This helps avoiding few circular dependency
lockdeps around debugfs and interconnects.

Reported-by: Rob Clark &lt;robdclark@gmail.com&gt;
Reported-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Fix early exit from dev_pm_opp_register_set_opp_helper()</title>
<updated>2020-10-27T05:08:28Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-10-20T10:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=47efcbcb340cca5d3b3d515964f09e1fec599a29'/>
<id>urn:sha1:47efcbcb340cca5d3b3d515964f09e1fec599a29</id>
<content type='text'>
We returned earlier by mistake even when there were no failures. Fix it.

Fixes: dd461cd9183f ("opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER")
Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Tested-by: Naresh Kamboju &lt;naresh.kamboju@linaro.com&gt;
</content>
</entry>
<entry>
<title>opp: Don't always remove static OPPs in _of_add_opp_table_v1()</title>
<updated>2020-10-27T05:08:28Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-10-14T04:26:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=1f6620f87006dc02c608466cd990778aaadf386a'/>
<id>urn:sha1:1f6620f87006dc02c608466cd990778aaadf386a</id>
<content type='text'>
The patch missed returning 0 early in case of success and hence the
static OPPs got removed by mistake. Fix it.

Fixes: 90d46d71cce2 ("opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()")
Reported-by: Aisheng Dong &lt;aisheng.dong@nxp.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Tested-by: Dong Aisheng &lt;aisheng.dong@nxp.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm</title>
<updated>2020-10-05T11:31:32Z</updated>
<author>
<name>Rafael J. Wysocki</name>
<email>rafael.j.wysocki@intel.com</email>
</author>
<published>2020-10-05T11:31:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=757e282188f0138a06ebf925c950995feb7bd666'/>
<id>urn:sha1:757e282188f0138a06ebf925c950995feb7bd666</id>
<content type='text'>
Pull opertaing performance points (OPP) framework fixes for 5.10-rc1
from Viresh Kumar:

"- Return -EPROBE_DEFER properly from dev_pm_opp_get_opp_table()
   (Stephan Gerhold).

 - Minor cleanups around required-opps (Stephan Gerhold).

 - Extends opp-supported-hw property to contain multiple versions
   (Viresh Kumar).

 - Multiple cleanups around dev_pm_opp_attach_genpd() (Viresh Kumar).

 - Multiple fixes, cleanups in the OPP core for overall better design
   (Viresh Kumar)."

* 'opp/linux-next' of git://git.kernel.org/pub/scm/linux/kernel/git/vireshk/pm:
  opp: Allow opp-level to be set to 0
  opp: Prevent memory leak in dev_pm_opp_attach_genpd()
  ARM: tegra: Pass multiple versions in opp-supported-hw property
  opp: Allow opp-supported-hw to contain multiple versions
  dt-bindings: opp: Allow opp-supported-hw to contain multiple versions
  opp: Set required OPPs in reverse order when scaling down
  opp: Reduce code duplication in _set_required_opps()
  opp: Drop unnecessary check from dev_pm_opp_attach_genpd()
  opp: Handle multiple calls for same OPP table in _of_add_opp_table_v1()
  opp: Allow dev_pm_opp_get_opp_table() to return -EPROBE_DEFER
  opp: Remove _dev_pm_opp_find_and_remove_table() wrapper
  opp: Split out _opp_set_rate_zero()
  opp: Reuse the enabled flag in !target_freq path
  opp: Rename regulator_enabled and use it as status of all resources
</content>
</entry>
<entry>
<title>opp: Allow opp-level to be set to 0</title>
<updated>2020-09-16T08:32:34Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-09-11T09:26:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a5663c9b1e31c00e0bdfaf4d92eb51358fc3950f'/>
<id>urn:sha1:a5663c9b1e31c00e0bdfaf4d92eb51358fc3950f</id>
<content type='text'>
The DT bindings don't put such a constraint, nor should the kernel. It
is perfectly fine for opp-level to be set to 0, if we need to put the
performance state votes for a domain for a particular OPP.

Reported-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Tested-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Prevent memory leak in dev_pm_opp_attach_genpd()</title>
<updated>2020-09-16T08:32:33Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-08-31T05:52:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cb60e9602cce1593eb1e9cdc8ee562815078a354'/>
<id>urn:sha1:cb60e9602cce1593eb1e9cdc8ee562815078a354</id>
<content type='text'>
If dev_pm_opp_attach_genpd() is called multiple times (once for each CPU
sharing the table), then it would result in unwanted behavior like
memory leak, attaching the domain multiple times, etc.

Handle that by checking and returning earlier if the domains are already
attached. Now that dev_pm_opp_detach_genpd() can get called multiple
times as well, we need to protect that too.

Note that the virtual device pointers aren't returned in this case, as
they may become unavailable to some callers during the middle of the
operation.

Reported-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Allow opp-supported-hw to contain multiple versions</title>
<updated>2020-09-16T08:32:33Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-08-26T11:02:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ff25c99042a56cd1580b381dd747a56286489cd'/>
<id>urn:sha1:0ff25c99042a56cd1580b381dd747a56286489cd</id>
<content type='text'>
The bindings allow multiple versions to be passed to "opp-supported-hw"
property, either of which can result in enabling of the OPP.

Update code to allow that.

Tested-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
Tested-by: Dmitry Osipenko &lt;digetx@gmail.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Set required OPPs in reverse order when scaling down</title>
<updated>2020-09-16T08:32:33Z</updated>
<author>
<name>Stephan Gerhold</name>
<email>stephan@gerhold.net</email>
</author>
<published>2020-07-30T08:01:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2c59138c22f17c1da027d3c90dbcdd6995c77414'/>
<id>urn:sha1:2c59138c22f17c1da027d3c90dbcdd6995c77414</id>
<content type='text'>
The OPP core already has well-defined semantics to ensure required
OPPs/regulators are set before/after the frequency change, depending
on if we scale up or down.

Similar requirements might exist for the order of required OPPs
when multiple power domains need to be scaled for a frequency change.

For example, on Qualcomm platforms using CPR (Core Power Reduction),
we need to scale the VDDMX and CPR power domain. When scaling up,
MX should be scaled up before CPR. When scaling down, CPR should be
scaled down before MX.

In general, if there are multiple "required-opps" in the device tree
I would expect that the order is either irrelevant, or there is some
dependency between the power domains. In that case, the power domains
should be scaled down in reverse order.

This commit updates _set_required_opps() to set required OPPs in
reverse order when scaling down.

Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
[ Viresh: Fix rebase conflict and minor rearrangement of the code ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Reduce code duplication in _set_required_opps()</title>
<updated>2020-09-16T08:32:33Z</updated>
<author>
<name>Stephan Gerhold</name>
<email>stephan@gerhold.net</email>
</author>
<published>2020-07-30T08:01:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=60cdeae0d627eca4ae616e3097a1f00ac9f3d704'/>
<id>urn:sha1:60cdeae0d627eca4ae616e3097a1f00ac9f3d704</id>
<content type='text'>
Move call to dev_pm_genpd_set_performance_state() to a separate
function so we can avoid duplicating the code for the single and
multiple genpd case.

Signed-off-by: Stephan Gerhold &lt;stephan@gerhold.net&gt;
[ Viresh: Validate virtual device before use ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Drop unnecessary check from dev_pm_opp_attach_genpd()</title>
<updated>2020-09-16T08:32:33Z</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2020-08-27T09:36:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=475ac8ead803e8c3a8f492e3129b1a19d7e2efd7'/>
<id>urn:sha1:475ac8ead803e8c3a8f492e3129b1a19d7e2efd7</id>
<content type='text'>
Since commit c0ab9e0812da ("opp: Allocate genpd_virt_devs from
dev_pm_opp_attach_genpd()"), the allocation of the virtual devices is
moved to dev_pm_opp_attach_genpd() and this check isn't required anymore
as it will always fail. Drop it.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
</feed>
