<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/stable/linux.git/drivers/pmdomain/mediatek, branch master</title>
<subtitle>Linux kernel stable tree</subtitle>
<id>https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master</id>
<link rel='self' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/'/>
<updated>2026-07-13T10:42:17+00:00</updated>
<entry>
<title>pmdomain: mediatek: Fix possible nullptr KP in HWV cleanup/on-check</title>
<updated>2026-07-13T10:42:17+00:00</updated>
<author>
<name>AngeloGioacchino Del Regno</name>
<email>angelogioacchino.delregno@collabora.com</email>
</author>
<published>2026-07-09T08:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a4876f11aa1d076802676e23f8af500706e780e3'/>
<id>urn:sha1:a4876f11aa1d076802676e23f8af500706e780e3</id>
<content type='text'>
Should probe fail for HW_VOTER type power domains, this driver was
unconditionally trying to perform cleanup for DIRECT_CTL domains,
but only after checking if the target domain is powered on... with
the DIRECT_CTL scpsys_domain_is_on() code again.

And there's more: the scpsys_domain_is_on() function is also being
unconditionally used in the probe path, for any power domain that
has flag MTK_SCPD_KEEP_DEFAULT_OFF!

This bug was never experienced by anyone because the HWV domains
never failed probe, and because none of those is declared with the
aforementioned flag - but it's still something critical.

In order to fix this, add a check for MTCMOS Type and, based on
that, call the correct functions for an "is on" check, and also
do the same for the cleanup path, calling the correct functions
for the "power off" action.

For the latter, since there's a call to pm_genpd_remove() right
before calling power_off, be cautious and add a variation of the
power off functions (with a _internal suffix) for those to get a
pointer to scpsys_domain instead of one to generic_pm_domain as,
even if that's still working, this is way too much fragile and
would break at some point.

Fixes: 88914db077b6 ("pmdomain: mediatek: Add support for Hardware Voter power domains")
Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mediatek: mfg: move __packed after struct name to fix kernel-doc</title>
<updated>2026-06-03T10:04:31+00:00</updated>
<author>
<name>Rosen Penev</name>
<email>rosenp@gmail.com</email>
</author>
<published>2026-05-28T20:24:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e46d95f060a2d465413638c5861ee0c205ba12b5'/>
<id>urn:sha1:e46d95f060a2d465413638c5861ee0c205ba12b5</id>
<content type='text'>
The kernel-doc parser cannot parse 'struct __packed mtk_mfg_opp_entry {'.
Move __packed to the closing brace, which is the more common kernel style.

Assisted-by: Opencode:Big-pickle
Signed-off-by: Rosen Penev &lt;rosenp@gmail.com&gt;
Signed-off-by: Ulf Hansson &lt;ulfh@kernel.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mediatek: fix use-after-free in scpsys_get_bus_protection_legacy()</title>
<updated>2026-04-27T12:53:30+00:00</updated>
<author>
<name>Wentao Liang</name>
<email>vulab@iscas.ac.cn</email>
</author>
<published>2026-04-08T14:11:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ec1fcddb3117d9452210e838fd37389ee61e10e8'/>
<id>urn:sha1:ec1fcddb3117d9452210e838fd37389ee61e10e8</id>
<content type='text'>
In scpsys_get_bus_protection_legacy(), of_find_node_with_property()
returns a device node with its reference count incremented. The function
then calls of_node_put(node) before checking whether
syscon_regmap_lookup_by_phandle() returns an error. If an error occurs,
dev_err_probe() dereferences the node pointer to print diagnostic
information, but the node memory may have already been freed due to the
earlier of_node_put(), leading to a use-after-free vulnerability.

Fix this by moving the of_node_put() call after the error check, ensuring
the node is still valid when accessed in the error path.

Fixes: c29345fa5f66 ("pmdomain: mediatek: Refactor bus protection regmaps retrieval")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang &lt;vulab@iscas.ac.cn&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mediatek: Add power domain driver for MT8189 SoC</title>
<updated>2026-04-01T11:07:31+00:00</updated>
<author>
<name>Irving-CH Lin</name>
<email>irving-ch.lin@mediatek.com</email>
</author>
<published>2026-02-02T06:48:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6734a5e86b57fb6f500aea08626bb9b42b6d5d05'/>
<id>urn:sha1:6734a5e86b57fb6f500aea08626bb9b42b6d5d05</id>
<content type='text'>
Introduce a new power domain (pmd) driver for the MediaTek mt8189 SoC.
This driver ports and refines the power domain framework, dividing
hardware blocks (CPU, GPU, peripherals, etc.) into independent power
domains for precise and energy-efficient power management.

Signed-off-by: Irving-CH Lin &lt;irving-ch.lin@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mediatek: Add bus protect control flow for MT8189</title>
<updated>2026-04-01T11:07:31+00:00</updated>
<author>
<name>Irving-CH Lin</name>
<email>irving-ch.lin@mediatek.com</email>
</author>
<published>2026-02-02T06:48:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=35e09ed76b7f1dcc1d0a8f0897cb77f0c2ab028e'/>
<id>urn:sha1:35e09ed76b7f1dcc1d0a8f0897cb77f0c2ab028e</id>
<content type='text'>
In MT8189 mminfra power domain, the bus protect policy separates
into two parts, one is set before subsys clocks enabled, and another
need to enable after subsys clocks enable.

Signed-off-by: Irving-CH Lin &lt;irving-ch.lin@mediatek.com&gt;
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Reviewed-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mediatek: scpsys: Add MT7622 Audio power domain to legacy driver</title>
<updated>2026-04-01T11:07:31+00:00</updated>
<author>
<name>AngeloGioacchino Del Regno</name>
<email>angelogioacchino.delregno@collabora.com</email>
</author>
<published>2026-01-13T11:00:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=6d1fdcfeb026bc3efbe2f06bf2204152b21c401e'/>
<id>urn:sha1:6d1fdcfeb026bc3efbe2f06bf2204152b21c401e</id>
<content type='text'>
Add the Audio power domain of the MT7622 SoC to the legacy
mtk-scpsys driver (as this legacy SoC is supported only there).

Signed-off-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mediatek: Simplify with scoped for each OF child loop</title>
<updated>2026-04-01T11:07:31+00:00</updated>
<author>
<name>Krzysztof Kozlowski</name>
<email>krzysztof.kozlowski@oss.qualcomm.com</email>
</author>
<published>2026-01-02T12:48:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=ecd2f0eaffad8cb8245d11b64bb1ccc7a40da565'/>
<id>urn:sha1:ecd2f0eaffad8cb8245d11b64bb1ccc7a40da565</id>
<content type='text'>
Use scoped for-each loop when iterating over device nodes to make code a
bit simpler.

Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@oss.qualcomm.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mediatek: mtk-mfg: Expose shader_present as nvmem cell</title>
<updated>2026-04-01T11:07:31+00:00</updated>
<author>
<name>Nicolas Frattaroli</name>
<email>nicolas.frattaroli@collabora.com</email>
</author>
<published>2025-12-20T18:49:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=aeb6d7c676f9938e59798b4203e6bb4e8b9f6d2d'/>
<id>urn:sha1:aeb6d7c676f9938e59798b4203e6bb4e8b9f6d2d</id>
<content type='text'>
Implement nvmem-provider functionality in mtk-mfg-pmdomain, such that it
can expose its GF_REG_SHADER_PRESENT value in the shared memory as an
nvmem cell for panthor.

Signed-off-by: Nicolas Frattaroli &lt;nicolas.frattaroli@collabora.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mediatek: Fix power domain count</title>
<updated>2026-03-12T13:51:52+00:00</updated>
<author>
<name>Adam Ford</name>
<email>aford173@gmail.com</email>
</author>
<published>2026-02-10T05:37:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b22c526569e6af84008b674e66378e771bfbdd94'/>
<id>urn:sha1:b22c526569e6af84008b674e66378e771bfbdd94</id>
<content type='text'>
The wrong value of the number of domains is wrong which leads to
failures when trying to enumerate nested power domains.

 PM: genpd_xlate_onecell: invalid domain index 0
 PM: genpd_xlate_onecell: invalid domain index 1
 PM: genpd_xlate_onecell: invalid domain index 3
 PM: genpd_xlate_onecell: invalid domain index 4
 PM: genpd_xlate_onecell: invalid domain index 5
 PM: genpd_xlate_onecell: invalid domain index 13
 PM: genpd_xlate_onecell: invalid domain index 14

Attempts to use these power domains fail, so fix this by
using the correct value of calculated power domains.

Signed-off-by: Adam Ford &lt;aford173@gmail.com&gt;
Fixes: 88914db077b6 ("pmdomain: mediatek: Add support for Hardware Voter power domains")
Reviewed-by: AngeloGioacchino Del Regno &lt;angelogioacchino.delregno@collabora.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
<entry>
<title>pmdomain: mtk-pm-domains: Fix spinlock recursion fix in probe</title>
<updated>2025-12-29T10:41:09+00:00</updated>
<author>
<name>Macpaul Lin</name>
<email>macpaul.lin@mediatek.com</email>
</author>
<published>2025-11-28T04:17:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.rulkc.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=305f254727bd379bbed0385afa0162f5bde1f51c'/>
<id>urn:sha1:305f254727bd379bbed0385afa0162f5bde1f51c</id>
<content type='text'>
Remove scpsys_get_legacy_regmap(), replacing its usage with
of_find_node_with_property(). Explicitly call of_node_get(np) before each
of_find_node_with_property() to maintain correct node reference counting.

The of_find_node_with_property() function "consumes" its input by calling
of_node_put() internally, whether or not it finds a match.  Currently,
dev-&gt;of_node (np) is passed multiple times in sequence without incrementing
its reference count, causing it to be decremented multiple times and
risking early memory release.

Adding of_node_get(np) before each call balances the reference count,
preventing premature node release.

Fixes: c1bac49fe91f ("pmdomains: mtk-pm-domains: Fix spinlock recursion in probe")
Cc: stable@vger.kernel.org
Signed-off-by: Macpaul Lin &lt;macpaul.lin@mediatek.com&gt;
Tested-by: Louis-Alexis Eyraud &lt;louisalexis.eyraud@collabora.com&gt;
Signed-off-by: Ulf Hansson &lt;ulf.hansson@linaro.org&gt;
</content>
</entry>
</feed>
