All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Peng Fan <peng.fan@nxp.com>
Cc: "cristian.marussi@arm.com" <cristian.marussi@arm.com>,
	"souvik.chakravarty@arm.com" <souvik.chakravarty@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"arm-scmi@vger.kernel.org" <arm-scmi@vger.kernel.org>,
	Chuck Cannon <chuck.cannon@nxp.com>
Subject: Re: POWER_DOMAIN_ATTRIBUTES in SCMI
Date: Tue, 18 Feb 2025 10:41:15 +0000	[thread overview]
Message-ID: <Z7Rjyy7_Jg66vqCf@bogus> (raw)
In-Reply-To: <PAXPR04MB8459E8D1A82DE43C08B6C26788FE2@PAXPR04MB8459.eurprd04.prod.outlook.com>

On Fri, Feb 14, 2025 at 09:20:27AM +0000, Peng Fan wrote:
> All,
>
> Previously I posted a patch to linux to set all power domains
> with "GENPD_FLAG_ACTIVE_WAKEUP" set in
> drivers/pmdomain/arm/scmi_pm_domain.c

Yes, I remember ACK-ing that and now I am thinking why 😄.
The description of the flag GENPD_FLAG_ACTIVE_WAKEUP says:
"Instructs genpd to keep the PM domain powered on, in case any of its
attached devices is used in the wakeup path to serve system wakeups."

Does that mean all the SCMI power domains remain powered on with this
flag ? If so, that sounds wrong to me. I hope it is not the case and it
is effective only if the device attached is wakeup source.

> But in the end we find that some power domains
> could be in off state while it still could wakeup
> the system. And we have a downstream patch
> +               if (!strcmp(scmi_pd->name, "hsio_top"))
> +                       scmi_pd->genpd.flags = 0;
>

There you go, so you simply rushed some solution upstream to carry less
patches downstream but this time you got bitten again. Sorry, but I am
seeing a pattern from you here and I don't really like that.

> So I am wondering to extend the attributes of SCMI spec,
> Saying In SCMI spec(DEN0056E)
> 4.3.2.5 POWER_DOMAIN_ATTRIBUTES
> Page 44 of 210:
> 
> Bit[26]: If set to 1, the power domain could
> wakeup the system with power state
> set as off.
>

This is not what the above flag is all about. It just instructs genpd
to keep the power domain ON as the device attached to it could be a wakeup
source. They are not one and the same. If the device is marked wakeup in
the DT and it is both wakeup capable and is enabled, it shouldn't request
the power domain to be powered off when suspending. Why is that not
sufficient here ? What am I missing ? I am interested in knowing it as
it is important to fix the issue you are trying to address here.

> This is just an idea in my mind, I not
> write code to verify, just wanna to see
> any comments from your side.
> 

I wonder if we need to revert GENPD_FLAG_ACTIVE_WAKEUP flag enabling on
all SCMI power domains if that is not solving the problem you thought it
would.

-- 
Regards,
Sudeep

  reply	other threads:[~2025-02-18 10:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14  9:20 POWER_DOMAIN_ATTRIBUTES in SCMI Peng Fan
2025-02-18 10:41 ` Sudeep Holla [this message]
2025-02-18 13:08   ` Peng Fan
2025-02-18 13:57     ` Vincent Guittot
2025-02-18 15:02       ` Ulf Hansson
2025-02-18 15:26         ` Sudeep Holla
2025-02-18 16:31         ` Peng Fan
2025-02-20  2:53           ` Peng Fan
2025-02-20  9:59             ` Souvik Chakravarty
2025-04-08  0:23               ` Kevin Hilman
2025-02-18 16:20       ` Peng Fan

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=Z7Rjyy7_Jg66vqCf@bogus \
    --to=sudeep.holla@arm.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=chuck.cannon@nxp.com \
    --cc=cristian.marussi@arm.com \
    --cc=dan.carpenter@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=souvik.chakravarty@arm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.