public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Peng Fan <peng.fan@nxp.com>, Sudeep Holla <sudeep.holla@arm.com>,
	"cristian.marussi@arm.com" <cristian.marussi@arm.com>,
	"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
	Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>,
	Glen G Wienecke <glen.wienecke@nxp.com>
Subject: Re: Question regarding scmi_perf_domain.c
Date: Tue, 17 Oct 2023 10:04:23 +0100	[thread overview]
Message-ID: <ZS5OFzLjEEZi0Q8s@bogus> (raw)
In-Reply-To: <CAPDyKFoJpnF_CezT6RySPpAwJY0+LO+RiSqqM=byTaRibKQPyg@mail.gmail.com>

On Mon, Oct 16, 2023 at 05:08:18PM +0200, Ulf Hansson wrote:
> On Thu, 12 Oct 2023 at 13:53, Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Wed, 11 Oct 2023 at 16:17, Sudeep Holla <sudeep.holla@arm.com> wrote:
> > >
> > > On Wed, Oct 11, 2023 at 11:26:54AM +0200, Ulf Hansson wrote:
> > >
> > > [..]
> > >
> > > > Not sure exactly what you are referring to when saying that "automatic
> > > > power domain on is broken". Genpd power-on the PM domain for a device
> > > > that gets attached to it, if the device has only a single PM domain.
> > > > This is the legacy behaviour.
> > > >
> > > > When we added support for multiple PM domains per device, we decided
> > > > to *not* power-on the PM domain, if the device that gets attached has
> > > > multiple PM domains. This behaviour was chosen deliberately, to allow
> > > > consumer drivers to decide themselves instead. Is there a problem with
> > > > this you think?
> > > >
> > >
> > > Just my understanding. Since the second PM domain added now is for perf
> > > and is not strictly power domain, Peng's concern is switching to this
> > > binding will make the platform loose this automatic genpd power-on
> > > feature.
> >
> > Yes, correct, as they way things are today.
> >
> > It all boils down to that attaching a device to multiple PM domains
> > can't really be done in a generic way, as it becomes device/platform
> > specific. Since this needs to be managed by the drivers/buses anyway,
> > they might as well get control of what PM domain they need to power-on
> > to probe their devices.
>
> Due to the above, it might be a good idea to power-on the SCMI
> *power-domains* during boot and leave them on to allow drivers to
> continue to probe their devices?
>

Such workarounds in my opinion are always inviting troubles as few platforms
make not like it that way.

> Maybe a module parameter or Kconfig debug option could be used to control this?
>

May be that works, but again I see this as working around. If the expectation
is the driver must manage the PM domain eventually, does it make sense to
start doing that now. You termed the single domain power on automatically
in the genpd as the "legacy support". Do you mean there is a plan to remove
it or make drivers not rely on it ?

My main worry is now we are spreading this work around every where. It was
in genpd but now you want in SCMI power domain driver. It just makes things
harder to remove if the eventual plan is to make drivers take care of the
power domains themselves.

> In this way an updated DTS with that adds a performance domain to a
> consumer device node (which already has a power-domain), should allow
> the consumer driver to continue to probe successfully.
>

This will work, but I find it hard as addition of some extra information
in the DTS is ending up losing some feature which was otherwise available.
If platforms relied on it, they may just stick with clock bindings silently
as it is easier that way. Even expecting a module param might be a big ask
if someone working on the platform isn't aware of all the details.
That is my main concern.


--
Regards,
Sudeep

  reply	other threads:[~2023-10-17  9:04 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-10 10:30 Question regarding scmi_perf_domain.c Peng Fan
2023-10-10 10:38 ` Ulf Hansson
2023-10-10 10:55 ` Sudeep Holla
2023-10-10 11:02   ` Ulf Hansson
2023-10-10 12:01     ` Peng Fan
2023-10-10 13:00       ` Sudeep Holla
2023-10-10 13:15         ` Peng Fan
2023-10-10 13:30           ` Sudeep Holla
2023-10-10 13:43             ` Peng Fan
2023-10-10 14:51               ` Sudeep Holla
2023-10-10 15:23                 ` Ulf Hansson
2023-10-10 16:23                   ` Sudeep Holla
2023-10-10 21:14                     ` Ulf Hansson
2023-10-11  0:30                 ` Peng Fan
2023-10-11  9:16                   ` Sudeep Holla
2023-10-11  9:26                   ` Ulf Hansson
2023-10-11 11:52                     ` Peng Fan
2023-10-11 14:15                     ` Sudeep Holla
2023-10-12 11:53                       ` Ulf Hansson
2023-10-16 15:08                         ` Ulf Hansson
2023-10-17  9:04                           ` Sudeep Holla [this message]
2023-10-17 10:46                             ` Ulf Hansson
2023-10-17 13:49                               ` Sudeep Holla
2023-10-17 13:18                           ` Peng Fan
2023-10-17 13:55                             ` Sudeep Holla
2023-10-17 14:35                               ` Peng Fan
2023-10-17 16:24                                 ` Sudeep Holla
2023-10-10 12:48     ` Sudeep Holla
2023-10-10 12:53       ` Peng Fan
2023-10-10 13:02         ` Sudeep Holla

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=ZS5OFzLjEEZi0Q8s@bogus \
    --to=sudeep.holla@arm.com \
    --cc=cristian.marussi@arm.com \
    --cc=glen.wienecke@nxp.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=peng.fan@nxp.com \
    --cc=ranjani.vaidyanathan@nxp.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