[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<PA4PR04MB9485E9C126E48A088D7E399B921F2@PA4PR04MB9485.eurprd04.prod.outlook.com>
Date: Mon, 13 Jan 2025 19:54:06 +0000
From: Ranjani Vaidyanathan <ranjani.vaidyanathan@....com>
To: Sudeep Holla <sudeep.holla@....com>
CC: Peng Fan <peng.fan@....com>, "Peng Fan (OSS)" <peng.fan@....nxp.com>,
"cristian.marussi@....com" <cristian.marussi@....com>,
"ulf.hansson@...aro.org" <ulf.hansson@...aro.org>, "arm-scmi@...r.kernel.org"
<arm-scmi@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "linux-pm@...r.kernel.org"
<linux-pm@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: RE: [EXT] Re: [PATCH] pmdomain: arm: scmi_pm_domain: Initialize state
as off
Hello Sudeep,
Will try to explain the situation we are facing.
1. We have multiple agents running, Agent-A is booted up first before Linux is booted and powers up a shared power domain PD-X
2. Linux boots and gets the power state of PD-X. And its already ON. And then PD -X is initialized with a default ON state.
3. When the driver that needs PD-X is probed, Linux sees that the power domain status is ON and never makes an SCMI call to power up the PD-X for Linux Agent
4. Agent-A now is shutdown/suspends. Linux will crash because the platform disables PD-X because it has no other requests for PD-X.
Regards,
Ranjani Vaidyanathan
-----Original Message-----
From: Sudeep Holla [mailto:sudeep.holla@....com]
Sent: Monday, January 13, 2025 11:21 AM
To: Ranjani Vaidyanathan <ranjani.vaidyanathan@....com>
Cc: Peng Fan <peng.fan@....com>; Peng Fan (OSS) <peng.fan@....nxp.com>; Sudeep Holla <sudeep.holla@....com>; cristian.marussi@....com; ulf.hansson@...aro.org; arm-scmi@...r.kernel.org; linux-arm-kernel@...ts.infradead.org; linux-pm@...r.kernel.org; linux-kernel@...r.kernel.org
Subject: Re: [EXT] Re: [PATCH] pmdomain: arm: scmi_pm_domain: Initialize state as off
Caution: This is an external email. Please take care when clicking links or opening attachments. When in doubt, report the message using the 'Report this email' button
On Mon, Jan 13, 2025 at 03:30:58PM +0000, Ranjani Vaidyanathan wrote:
> -----Original Message-----
> From: Sudeep Holla [mailto:sudeep.holla@....com]
> Sent: Monday, January 13, 2025 7:49 AM
> To: Peng Fan <peng.fan@....com>
> Cc: Peng Fan (OSS) <peng.fan@....nxp.com>; cristian.marussi@....com;
> Sudeep Holla <sudeep.holla@....com>; ulf.hansson@...aro.org;
> arm-scmi@...r.kernel.org; linux-arm-kernel@...ts.infradead.org;
> linux-pm@...r.kernel.org; linux-kernel@...r.kernel.org; Ranjani
> Vaidyanathan <ranjani.vaidyanathan@....com>
> Subject: [EXT] Re: [PATCH] pmdomain: arm: scmi_pm_domain: Initialize
> state as off
>
> On Mon, Jan 13, 2025 at 11:37:23AM +0000, Peng Fan wrote:
> > > Subject: Re: [PATCH] pmdomain: arm: scmi_pm_domain: Initialize
> > > state as off
> > >
> > > On Fri, Jan 10, 2025 at 02:13:46PM +0800, Peng Fan (OSS) wrote:
> > > > From: Peng Fan <peng.fan@....com>
> > > >
> > > > Per ARM SCMI Spec DEN0056E, page 16, "The platform may disable a
> > > > resource if no agent has requested to use that resource."
> > > >
> > >
> > > True, but ...
> > >
> > > > Linux Kernel should not rely on a state that it has not
> > > > requested, so make state as off during initialization.
> > > >
> > >
> > > IIUC, this was done to avoid any transitions if the bootloader
> > > like
> > > U- Boot has turned on the resource and OS can just rely on that stay.
> >
> > But if it is not U-Boot turned it on?
>
> Not sure if I understand what exactly you mean by that.
> [RV] Its possible that some other agent (M33/M7 running OS) in the
> system turned on the power domain. Resources in the same power domain
> can shared across agents. That being said, uboot provides mechanism
> to clean up any power domains/clocks that it enabled. And our
> implementation of uboot does disable any power domain it powered up
> for downloading of images or anything else (display is a unique case if splash screen is enabled).
>
Right I was referring to the display as one of the example when I referred to the case where bootloader turns on the resource.
> >
> > Because the power domain is ON, kernel will not issue SCMI to
> > platform to request it ON when kernel needs this power domain on.
> >
>
> Yes, but the agent(via bootloader) has already requested the SCMI
> platform, so it should be fine. No ?
> [RV] As mentioned above, it need not be the bootloader. And secondly
> how to handle this power domain during suspend/resume? It's possible
> that the agent that turned on the power domain initially will have
> different wakeup requirements. IMO Linux should completely be
> responsible for the power domains that the drivers need.
>
May be I am still missing something. The genpd framework does issue power down of all the PD that are not used once we boot. Is that not sufficient.
We are just not changing the pd state when initialising the genpds.
Is that causing the issue ? I was under the impression that it shouldn't matter if the driver manages the genpds they consume and all unused ones get turned off eventually.
What exactly is the issue for which this patch is the solution ? I think I might have not understood the issue properly here. Sorry if that is the case.
--
Regards,
Sudeep
Powered by blists - more mailing lists