<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/opp/core.c, branch linux-5.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-10-29T09:08:24Z</updated>
<entry>
<title>opp: Prevent memory leak in dev_pm_opp_attach_genpd()</title>
<updated>2020-10-29T09:08:24Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2020-08-31T05:52:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0c35ab58c587b1e812908c524c25850506d75b42'/>
<id>urn:sha1:0c35ab58c587b1e812908c524c25850506d75b42</id>
<content type='text'>
[ Upstream commit cb60e9602cce1593eb1e9cdc8ee562815078a354 ]

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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>opp: Don't drop reference for an OPP table that was never parsed</title>
<updated>2020-09-09T17:14:19Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2020-08-31T07:33:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e5d5c3b4e4a27ba8b36401d019c37c61e4e45a8c'/>
<id>urn:sha1:e5d5c3b4e4a27ba8b36401d019c37c61e4e45a8c</id>
<content type='text'>
[ Upstream commit 922ff0759a16299e24cacfc981ac07914d8f1826 ]

dev_pm_opp_remove_table() should drop a reference to the OPP table only
if the DT OPP table was parsed earlier with a call to
dev_pm_opp_of_add_table() earlier. Else it may end up dropping the
reference to the OPP table, which was added as a result of other calls
like dev_pm_opp_set_clkname(). And would hence result in undesirable
behavior later on when caller would try to free the resource again.

Fixes: 03758d60265c ("opp: Replace list_kref with a local counter")
Reported-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Reported-by: Anders Roxell &lt;anders.roxell@linaro.org&gt;
Tested-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>opp: Put opp table in dev_pm_opp_set_rate() if _set_opp_bw() fails</title>
<updated>2020-08-26T09:49:00Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2020-08-11T21:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e25d2b38fe64f91e853531dfa4ff07e986a9f9de'/>
<id>urn:sha1:e25d2b38fe64f91e853531dfa4ff07e986a9f9de</id>
<content type='text'>
commit d4ec88d205583ac4f9482cf3e89128589bd881d2 upstream.

We get the opp_table pointer at the top of the function and so we should
put the pointer at the end of the function like all other exit paths
from this function do.

Cc: v5.8+ &lt;stable@vger.kernel.org&gt; # v5.8+
Fixes: b00e667a6d8b ("opp: Remove bandwidth votes when target_freq is zero")
Reviewed-by: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
[ Viresh: Split the patch into two ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>opp: Put opp table in dev_pm_opp_set_rate() for empty tables</title>
<updated>2020-08-26T09:49:00Z</updated>
<author>
<name>Stephen Boyd</name>
</author>
<published>2020-08-11T21:28:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9cb98fa067faa4592833552baf76b33d0cc8412b'/>
<id>urn:sha1:9cb98fa067faa4592833552baf76b33d0cc8412b</id>
<content type='text'>
commit 8979ef70850eb469e1094279259d1ef393ffe85f upstream.

We get the opp_table pointer at the top of the function and so we should
put the pointer at the end of the function like all other exit paths
from this function do.

Cc: v5.7+ &lt;stable@vger.kernel.org&gt; # v5.7+
Fixes: aca48b61f963 ("opp: Manage empty OPP tables with clk handle")
Reviewed-by: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
Signed-off-by: Stephen Boyd &lt;swboyd@chromium.org&gt;
[ Viresh: Split the patch into two ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>opp: Enable resources again if they were disabled earlier</title>
<updated>2020-08-26T09:49:00Z</updated>
<author>
<name>Rajendra Nayak</name>
</author>
<published>2020-08-10T07:06:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8996e480762da98971e29a518596f414c3f2248'/>
<id>urn:sha1:e8996e480762da98971e29a518596f414c3f2248</id>
<content type='text'>
commit a4501bac0e553bed117b7e1b166d49731caf7260 upstream.

dev_pm_opp_set_rate() can now be called with freq = 0 in order
to either drop performance or bandwidth votes or to disable
regulators on platforms which support them.

In such cases, a subsequent call to dev_pm_opp_set_rate() with
the same frequency ends up returning early because 'old_freq == freq'

Instead make it fall through and put back the dropped performance
and bandwidth votes and/or enable back the regulators.

Cc: v5.3+ &lt;stable@vger.kernel.org&gt; # v5.3+
Fixes: cd7ea582866f ("opp: Make dev_pm_opp_set_rate() handle freq = 0 to drop performance votes")
Reported-by: Sajida Bhanu &lt;sbhanu@codeaurora.org&gt;
Reviewed-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
Reported-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Tested-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Rajendra Nayak &lt;rnayak@codeaurora.org&gt;
[ Viresh: Don't skip clk_set_rate() and massaged changelog ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>opp: Remove bandwidth votes when target_freq is zero</title>
<updated>2020-05-29T04:45:12Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2020-05-27T04:03:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b00e667a6d8b2b0f53098ec12ff1ffe7f7c9be20'/>
<id>urn:sha1:b00e667a6d8b2b0f53098ec12ff1ffe7f7c9be20</id>
<content type='text'>
We already drop several votes when target_freq is set to zero, drop
bandwidth votes as well.

Reported-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
Reviewed-by: Georgi Djakov &lt;georgi.djakov@linaro.org&gt;
Tested-by: Georgi Djakov &lt;georgi.djakov@linaro.org&gt;
Reviewed-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
Tested-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: core: add regulators enable and disable</title>
<updated>2020-05-29T04:45:12Z</updated>
<author>
<name>Kamil Konieczny</name>
</author>
<published>2019-07-19T15:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d45719caaf56c859be0172447f8559c0df40f93'/>
<id>urn:sha1:8d45719caaf56c859be0172447f8559c0df40f93</id>
<content type='text'>
Add enable regulators to dev_pm_opp_set_regulators() and disable
regulators to dev_pm_opp_put_regulators(). Even if bootloader
leaves regulators enabled, they should be enabled in kernel in
order to increase the reference count.

Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Acked-by: Clément Péron &lt;peron.clem@gmail.com&gt;
Tested-by: Clément Péron &lt;peron.clem@gmail.com&gt;
Signed-off-by: Kamil Konieczny &lt;k.konieczny@samsung.com&gt;
[ Viresh: Enable the regulator only after it is programmed and add a
	  flag to track its status. ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Reorder the code for !target_freq case</title>
<updated>2020-05-29T04:45:12Z</updated>
<author>
<name>Viresh Kumar</name>
</author>
<published>2020-05-15T07:07:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b23dfa3543f31fbb8c0098925bf90fc23193d17a'/>
<id>urn:sha1:b23dfa3543f31fbb8c0098925bf90fc23193d17a</id>
<content type='text'>
Reorder the code a bit to make it more readable. Add additional comment
as well.

Tested-by: Marek Szyprowski &lt;m.szyprowski@samsung.com&gt;
Acked-by: Clément Péron &lt;peron.clem@gmail.com&gt;
Tested-by: Clément Péron &lt;peron.clem@gmail.com&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Update the bandwidth on OPP frequency changes</title>
<updated>2020-05-29T04:45:10Z</updated>
<author>
<name>Georgi Djakov</name>
</author>
<published>2020-05-12T12:53:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=fe2af40250bfc3cca9120cd5c315e2ea7a1082ed'/>
<id>urn:sha1:fe2af40250bfc3cca9120cd5c315e2ea7a1082ed</id>
<content type='text'>
If the OPP bandwidth values are populated, we want to switch also the
interconnect bandwidth in addition to frequency and voltage.

Signed-off-by: Georgi Djakov &lt;georgi.djakov@linaro.org&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
Reviewed-by: Sibi Sankar &lt;sibis@codeaurora.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>opp: Add support for parsing interconnect bandwidth</title>
<updated>2020-05-29T04:45:08Z</updated>
<author>
<name>Georgi Djakov</name>
</author>
<published>2020-05-12T12:53:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6d3f922c46f2e91f63c92f8dd28381f097082912'/>
<id>urn:sha1:6d3f922c46f2e91f63c92f8dd28381f097082912</id>
<content type='text'>
The OPP bindings now support bandwidth values, so add support to parse it
from device tree and store it into the new dev_pm_opp_icc_bw struct, which
is part of the dev_pm_opp.

Signed-off-by: Georgi Djakov &lt;georgi.djakov@linaro.org&gt;
Reviewed-by: Matthias Kaehlcke &lt;mka@chromium.org&gt;
[ Viresh: Create _read_bw() and use it, renamed _of_find_icc_paths() to
	  dev_pm_opp_of_find_icc_paths(), exported it and made opp_table
	  argument optional. Also drop the depends on from Kconfig. ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
</feed>
