linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
	Saravana Kannan <saravanak@google.com>,
	linux-pm@vger.kernel.org, Ulf Hansson <ulf.hansson@linaro.org>
Cc: Stephen Boyd <sboyd@kernel.org>,
	"Rafael J . Wysocki" <rafael@kernel.org>,
	Heiko Stuebner <heiko@sntech.de>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	Sebin Francis <sebin.francis@ti.com>,
	Diederik de Haas <didi.debian@cknow.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Abel Vesa <abel.vesa@linaro.org>, Peng Fan <peng.fan@oss.nxp.com>,
	Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>,
	Johan Hovold <johan@kernel.org>,
	Maulik Shah <maulik.shah@oss.qualcomm.com>,
	Michal Simek <michal.simek@amd.com>,
	Konrad Dybcio <konradybcio@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/5] pmdomain: rockchip: Fix regulator dependency with GENPD_FLAG_NO_STAY_ON
Date: Tue, 09 Sep 2025 15:49:15 +0200	[thread overview]
Message-ID: <4274915.mvXUDI8C0e@workhorse> (raw)
In-Reply-To: <20250909111130.132976-3-ulf.hansson@linaro.org>

On Tuesday, 9 September 2025 13:11:21 Central European Summer Time Ulf Hansson wrote:
> The deferred regulator retrieval for Rockchip PM domains are causing some
> weird dependencies. More precisely, if the power-domain is powered-on from
> the HW perspective, its corresponding regulator must not be powered-off via
> regulator_init_complete(), which is a late_initcall_sync.
> 
> Even on platforms that don't have the domain-supply regulator specified for
> the power-domain provider, may suffer from these problems.
> 
> More precisely, things just happen to work before, because
> genpd_power_off_unused() (also a late_initcall_sync) managed to power-off
> the PM domain before regulator_init_complete() powered-off the regulator.
> 
> Ideally this fragile dependency must be fixed properly for the Rockchip PM
> domains, but until then, let's fallback to the previous behaviour by using
> the GENPD_FLAG_NO_STAY_ON flag.
> 
> Link: https://lore.kernel.org/all/20250902-rk3576-lockup-regression-v1-1-c4a0c9daeb00@collabora.com/
> Reported-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Cc: Sebastian Reichel <sebastian.reichel@collabora.com>
> Fixes: 0e789b491ba0 ("pmdomain: core: Leave powered-on genpds on until sync_state")
> Fixes: 13a4b7fb6260 ("pmdomain: core: Leave powered-on genpds on until late_initcall_sync")
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  drivers/pmdomain/rockchip/pm-domains.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pmdomain/rockchip/pm-domains.c b/drivers/pmdomain/rockchip/pm-domains.c
> index 242570c505fb..1955c6d453e4 100644
> --- a/drivers/pmdomain/rockchip/pm-domains.c
> +++ b/drivers/pmdomain/rockchip/pm-domains.c
> @@ -865,7 +865,7 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
>  	pd->genpd.power_on = rockchip_pd_power_on;
>  	pd->genpd.attach_dev = rockchip_pd_attach_dev;
>  	pd->genpd.detach_dev = rockchip_pd_detach_dev;
> -	pd->genpd.flags = GENPD_FLAG_PM_CLK;
> +	pd->genpd.flags = GENPD_FLAG_PM_CLK | GENPD_FLAG_NO_STAY_ON;
>  	if (pd_info->active_wakeup)
>  		pd->genpd.flags |= GENPD_FLAG_ACTIVE_WAKEUP;
>  	pm_genpd_init(&pd->genpd, NULL,
> 

Tested-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>

Fixes the full-SoC lockup I've observed on my RK3576 Radxa ROCK 4D,
which before this patch would occur when the vdd_npu_s0 regulator
was disabled.

Thank you!

Kind regards,
Nicolas Frattaroli





  parent reply	other threads:[~2025-09-09 17:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-09 11:11 [PATCH 0/5] pmdomain: Restore behaviour for disabling unused PM domains Ulf Hansson
2025-09-09 11:11 ` [PATCH 1/5] pmdomain: core: " Ulf Hansson
2025-09-09 12:50   ` Heiko Stübner
2025-09-11  7:56   ` Geert Uytterhoeven
2025-09-11 10:25     ` Ulf Hansson
2025-09-09 11:11 ` [PATCH 2/5] pmdomain: rockchip: Fix regulator dependency with GENPD_FLAG_NO_STAY_ON Ulf Hansson
2025-09-09 12:50   ` Heiko Stübner
2025-09-09 13:49   ` Nicolas Frattaroli [this message]
2025-09-09 11:11 ` [PATCH 3/5] pmdomain: renesas: rcar-sysc: Don't keep unused PM domains powered-on Ulf Hansson
2025-09-11  7:56   ` Geert Uytterhoeven
2025-09-11  9:01   ` Geert Uytterhoeven
2025-09-11 10:31     ` Ulf Hansson
2025-09-09 11:11 ` [PATCH 4/5] pmdomain: renesas: rcar-gen4-sysc: " Ulf Hansson
2025-09-11  7:57   ` Geert Uytterhoeven
2025-09-09 11:11 ` [PATCH 5/5] pmdomain: renesas: rmobile-sysc: " Ulf Hansson
2025-09-11  7:58   ` Geert Uytterhoeven
2025-09-10 19:33 ` [PATCH 0/5] pmdomain: Restore behaviour for disabling unused PM domains Diederik de Haas
2025-09-11  7:18   ` Geert Uytterhoeven
2025-09-11  8:26     ` Diederik de Haas
2025-09-12 18:32       ` Saravana Kannan
2025-09-12 18:36 ` Saravana Kannan
2025-09-12 18:49   ` Nicolas Frattaroli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4274915.mvXUDI8C0e@workhorse \
    --to=nicolas.frattaroli@collabora.com \
    --cc=abel.vesa@linaro.org \
    --cc=andersson@kernel.org \
    --cc=didi.debian@cknow.org \
    --cc=geert@linux-m68k.org \
    --cc=heiko@sntech.de \
    --cc=johan@kernel.org \
    --cc=jonathanh@nvidia.com \
    --cc=konradybcio@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=maulik.shah@oss.qualcomm.com \
    --cc=michal.simek@amd.com \
    --cc=peng.fan@oss.nxp.com \
    --cc=rafael@kernel.org \
    --cc=saravanak@google.com \
    --cc=sboyd@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=sebin.francis@ti.com \
    --cc=thierry.reding@gmail.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).