linux/drivers/pmdomain
Bjorn Andersson e9eeb0dddf pmdomain: qcom: rpmhpd: Fix enabled_corner aggregation
commit 2a93c6cbd5 upstream.

Commit 'e3e56c050a ("soc: qcom: rpmhpd: Make power_on actually enable
the domain")' aimed to make sure that a power-domain that is being
enabled without any particular performance-state requested will at least
turn the rail on, to avoid filling DeviceTree with otherwise unnecessary
required-opps properties.

But in the event that aggregation happens on a disabled power-domain, with
an enabled peer without performance-state, both the local and peer
corner are 0. The peer's enabled_corner is not considered, with the
result that the underlying (shared) resource is disabled.

One case where this can be observed is when the display stack keeps mmcx
enabled (but without a particular performance-state vote) in order to
access registers and sync_state happens in the rpmhpd driver. As mmcx_ao
is flushed the state of the peer (mmcx) is not considered and mmcx_ao
ends up turning off "mmcx.lvl" underneath mmcx. This has been observed
several times, but has been painted over in DeviceTree by adding an
explicit vote for the lowest non-disabled performance-state.

Fixes: e3e56c050a ("soc: qcom: rpmhpd: Make power_on actually enable the domain")
Reported-by: Johan Hovold <johan@kernel.org>
Closes: https://lore.kernel.org/linux-arm-msm/ZdMwZa98L23mu3u6@hovoldconsulting.com/
Cc:  <stable@vger.kernel.org>
Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Tested-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20240226-rpmhpd-enable-corner-fix-v1-1-68c004cec48c@quicinc.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-03-06 14:48:41 +00:00
..
actions pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
amlogic pmdomain: amlogic: Fix mask for the second NNA mem PD domain 2023-11-28 17:20:00 +00:00
apple pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
bcm pmdomain: bcm: bcm2835-power: check if the ASB register is equal to enable 2023-11-28 17:19:59 +00:00
imx pmdomain: imx: Make imx pgc power domain also set the fwnode 2023-11-28 17:20:00 +00:00
mediatek pmdomain: mediatek: fix race conditions with genpd 2024-02-23 09:25:07 +01:00
qcom pmdomain: qcom: rpmhpd: Fix enabled_corner aggregation 2024-03-06 14:48:41 +00:00
renesas pmdomain: renesas: r8a77980-sysc: CR7 must be always on 2024-02-23 09:25:15 +01:00
rockchip pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
samsung pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
st pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
starfive pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
sunxi pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
tegra pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
ti pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
xilinx pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00
Makefile pmdomain: Rename the genpd subsystem to pmdomain 2023-09-13 11:09:21 +02:00