]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
pmdomain: ti-sci: Fix duplicate PD referrals
authorTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Mon, 15 Apr 2024 16:00:23 +0000 (19:00 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Jun 2024 12:40:37 +0000 (14:40 +0200)
commit3205e733b6dc24693452ecb46e2a2da02f6d3659
tree7084b971ad387c8e138b5c9f250d94333f7562c2
parent186d8e336a3030419c2ab66fef8bfd05fe20b912
pmdomain: ti-sci: Fix duplicate PD referrals

commit 670c900f69645db394efb38934b3344d8804171a upstream.

When the dts file has multiple referrers to a single PD (e.g.
simple-framebuffer and dss nodes both point to the DSS power-domain) the
ti-sci driver will create two power domains, both with the same ID, and
that will cause problems as one of the power domains will hide the other
one.

Fix this checking if a PD with the ID has already been created, and only
create a PD for new IDs.

Fixes: efa5c01cd7ee ("soc: ti: ti_sci_pm_domains: switch to use multiple genpds instead of one")
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240415-ti-sci-pd-v1-1-a0e56b8ad897@ideasonboard.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pmdomain/ti/ti_sci_pm_domains.c