<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/opp/core.c, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2026-02-26T22:59:00+00:00</updated>
<entry>
<title>OPP: Return correct value in dev_pm_opp_get_level</title>
<updated>2026-02-26T22:59:00+00:00</updated>
<author>
<name>Aleks Todorov</name>
<email>aleksbgbg@google.com</email>
</author>
<published>2026-01-23T14:03:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=27feb209c2d7bf86d652ff9f5a66c078f30ad71a'/>
<id>urn:sha1:27feb209c2d7bf86d652ff9f5a66c078f30ad71a</id>
<content type='text'>
[ Upstream commit 0b7277e02dabba2a9921a7f4761ae6e627e7297a ]

Commit 073d3d2ca7d4 ("OPP: Level zero is valid") modified the
documentation for this function to indicate that errors should return a
non-zero value to avoid colliding with the OPP level zero, however
forgot to actually update the return.

No in-tree kernel code depends on the error value being 0.

Fixes: 073d3d2ca7d4 ("OPP: Level zero is valid")
Signed-off-by: Aleks Todorov &lt;aleksbgbg@google.com&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: Add support to find OPP for a set of keys</title>
<updated>2025-08-26T05:10:58+00:00</updated>
<author>
<name>Krishna Chaitanya Chundru</name>
<email>krishna.chundru@oss.qualcomm.com</email>
</author>
<published>2025-08-20T08:28:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=05db35963eef7a55f1782190185cb8ddb9d923b7'/>
<id>urn:sha1:05db35963eef7a55f1782190185cb8ddb9d923b7</id>
<content type='text'>
Some clients, such as PCIe, may operate at the same clock frequency
across different data rates by varying link width. In such cases,
frequency alone is not sufficient to uniquely identify an OPP.

To support these scenarios, introduce a new API
dev_pm_opp_find_key_exact() that allows OPP lookup with different
set of keys like freq, level &amp; bandwidth.

Signed-off-by: Krishna Chaitanya Chundru &lt;krishna.chundru@oss.qualcomm.com&gt;
[ Viresh: Minor cleanups ]
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: switch to use kmemdup_array()</title>
<updated>2025-05-19T10:07:53+00:00</updated>
<author>
<name>Zhang Enpei</name>
<email>zhang.enpei@zte.com.cn</email>
</author>
<published>2025-05-15T12:13:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=03eadcbd981b4c9b10ec89a046deeccb115c98b3'/>
<id>urn:sha1:03eadcbd981b4c9b10ec89a046deeccb115c98b3</id>
<content type='text'>
Use kmemdup_array() to avoid multiplication and possible overflows.

Signed-off-by: Zhang Enpei &lt;zhang.enpei@zte.com.cn&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: Use mutex locking guards</title>
<updated>2025-05-02T05:25:52+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2025-04-24T08:45:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff9c512041f2b405536640374ae3a3fe10efaf8b'/>
<id>urn:sha1:ff9c512041f2b405536640374ae3a3fe10efaf8b</id>
<content type='text'>
Use mutex locking guard in the OPP core.

No intentional functional impact.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: Define and use scope-based cleanup helpers</title>
<updated>2025-05-02T05:25:40+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2025-04-23T08:51:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=8c5d8c0b9e8184a86baede72ca392f90d867d22e'/>
<id>urn:sha1:8c5d8c0b9e8184a86baede72ca392f90d867d22e</id>
<content type='text'>
Define and use scope-based cleanup helpers for `struct opp` and `struct
opp_table`.

No intentional functional impact.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: Return opp_table from dev_pm_opp_get_opp_table_ref()</title>
<updated>2025-04-24T10:35:56+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2025-04-23T10:18:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ead694941686345bfd3f95100d889191cb9e3cda'/>
<id>urn:sha1:ead694941686345bfd3f95100d889191cb9e3cda</id>
<content type='text'>
For convenience of users, return back the pointer to the opp_table from
dev_pm_opp_get_opp_table_ref(), so they can do:

	opp_table = dev_pm_opp_get_opp_table_ref(tmp_table);

No intentional functional impact.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: Return opp from dev_pm_opp_get()</title>
<updated>2025-04-24T10:35:53+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2025-04-23T10:18:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=7a3be00771aa9786c7bb4cdb0ee36fee45f67d69'/>
<id>urn:sha1:7a3be00771aa9786c7bb4cdb0ee36fee45f67d69</id>
<content type='text'>
For convenience of users, return back the pointer to the opp from
dev_pm_opp_get(), so they can do:

	opp = dev_pm_opp_get(tmp_opp);

No intentional functional impact.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: Remove _get_opp_table_kref()</title>
<updated>2025-04-24T10:35:33+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2025-04-24T08:51:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=4cb1383f9522a3d2f5e26b70688417187c7d48e4'/>
<id>urn:sha1:4cb1383f9522a3d2f5e26b70688417187c7d48e4</id>
<content type='text'>
Use dev_pm_opp_get_opp_table_ref() directly instead.

No intentional functional impact.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>PM / OPP: Add reference counting helpers for Rust implementation</title>
<updated>2025-01-20T03:35:51+00:00</updated>
<author>
<name>Viresh Kumar</name>
<email>viresh.kumar@linaro.org</email>
</author>
<published>2024-01-09T06:27:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b489e7946656ed67fea1a30f5103eb62a8686e04'/>
<id>urn:sha1:b489e7946656ed67fea1a30f5103eb62a8686e04</id>
<content type='text'>
To ensure that resources such as OPP tables or OPP nodes are not freed
while in use by the Rust implementation, it is necessary to increment
their reference count from Rust code.

This commit introduces a new helper function,
dev_pm_opp_get_opp_table_ref(), to increment the reference count of an
OPP table and declares the existing helper dev_pm_opp_get() in pm_opp.h.

Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
<entry>
<title>OPP: fix dev_pm_opp_find_bw_*() when bandwidth table not initialized</title>
<updated>2024-12-23T10:57:24+00:00</updated>
<author>
<name>Neil Armstrong</name>
<email>neil.armstrong@linaro.org</email>
</author>
<published>2024-12-03T08:13:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b44b9bc7cab2967c3d6a791b1cd542c89fc07f0e'/>
<id>urn:sha1:b44b9bc7cab2967c3d6a791b1cd542c89fc07f0e</id>
<content type='text'>
If a driver calls dev_pm_opp_find_bw_ceil/floor() the retrieve bandwidth
from the OPP table but the bandwidth table was not created because the
interconnect properties were missing in the OPP consumer node, the
kernel will crash with:

Unable to handle kernel NULL pointer dereference at virtual address 0000000000000004
...
pc : _read_bw+0x8/0x10
lr : _opp_table_find_key+0x9c/0x174
...
Call trace:
  _read_bw+0x8/0x10 (P)
  _opp_table_find_key+0x9c/0x174 (L)
  _find_key+0x98/0x168
  dev_pm_opp_find_bw_ceil+0x50/0x88
...

In order to fix the crash, create an assert function to check
if the bandwidth table was created before trying to get a
bandwidth with _read_bw().

Fixes: add1dc094a74 ("OPP: Use generic key finding helpers for bandwidth key")
Signed-off-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: Viresh Kumar &lt;viresh.kumar@linaro.org&gt;
</content>
</entry>
</feed>
