linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ulf Hansson <ulf.hansson@linaro.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Mark Brown <broonie@kernel.org>, Stephen Boyd <sboyd@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	Kevin Hilman <khilman@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rajendra Nayak <rnayak@codeaurora.org>
Subject: Re: [PATCH 2/2] PM: domain: use per-genpd lockdep class
Date: Thu, 1 Jul 2021 12:06:58 +0200	[thread overview]
Message-ID: <CAPDyKFqSwPn7wUXB9mayT78hshDFBK+DO7cqbmZRjXNAJDQfZw@mail.gmail.com> (raw)
In-Reply-To: <YNs3q0HI1WKrKOXx@yoga>

On Tue, 29 Jun 2021 at 17:09, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
>
> On Mon 28 Jun 14:55 CDT 2021, Dmitry Baryshkov wrote:
>
> > Hi,
> >
> > On 17/06/2021 12:07, Ulf Hansson wrote:
> > > + Rajendra
> > >
> > > On Tue, 15 Jun 2021 at 17:55, Bjorn Andersson
> > > <bjorn.andersson@linaro.org> wrote:
> [..]
> > > > But I am unable to find a way for the gdsc driver to get hold of the
> > > > struct generic_pm_domain of the resources exposed by the rpmhpd driver.
> > >
> > > You don't need a handle to the struct generic_pm_domain, to assign a
> > > parent/child domain. Instead you can use of_genpd_add_subdomain(),
> > > which takes two "struct of_phandle_args*" corresponding to the
> > > parent/child device nodes of the genpd providers and then let genpd
> > > internally do the look up.
> >
> [..]
> >
> > I think I'd need this function anyway for the gdsc code. During gdsc_init()
> > we check gdsc status and this requires register access (and thus powering on
> > the parent domain) before the gdsc is registered itself as a power domain.
> >
>
> But this is a register access in the dispcc block, which is the context
> that our gdsc_init() operates. So describing that MMCX is the
> power-domain for dispcc should ensure that the power-domain is enabled.

Right.

As a note, when we assign a child domain to a parent domain, via
of_genpd_add_subdomain() for example - and the child domain has been
powered on, this requires the parent domain to be turned on as well.

>
> We do however need to make sure that dispcc doesn't hog its
> power-domain, and that any register accesses in runtime is done with the
> parenting power-domain enabled. E.g. the clock framework wraps all
> operations in pm_runtime_get/put(), but I don't see anything in the
> gnepd code for this.
>
>
> And for gcc I'm worried that we might have some GDSCs that are parented
> by CX and some by MX, but I do still think that the register accesses
> are only related to one of these.
>
> But this seems like a continuation of the special case in dispcc, so I
> think we should be able to focus on getting that right before we attempt
> the general case (and I don't know if we have a need for this today).
>
> Regards,
> Bjorn

Unfortunately, I didn't understand all the above things.

In any case, please tell me if there is anything else that blocks you
from moving forward with the power domain conversion? I am happy to
help.

Kind regards
Uffe

  reply	other threads:[~2021-07-01 10:07 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-11 10:15 [PATCH 0/2] PM: domains: use separate lockdep class for each genpd Dmitry Baryshkov
2021-06-11 10:15 ` [PATCH 1/2] PM: domains: call mutex_destroy when removing the genpd Dmitry Baryshkov
2021-06-15 13:51   ` Greg Kroah-Hartman
2021-06-11 10:15 ` [PATCH 2/2] PM: domain: use per-genpd lockdep class Dmitry Baryshkov
2021-06-11 13:49   ` Ulf Hansson
2021-06-11 14:34     ` Dmitry Baryshkov
2021-06-15 10:17       ` Ulf Hansson
2021-06-15 11:10         ` Mark Brown
2021-06-15 14:55           ` Ulf Hansson
2021-06-15 15:26             ` Mark Brown
2021-06-15 15:35               ` Ulf Hansson
2021-06-15 15:38                 ` Mark Brown
2021-06-15 15:55         ` Bjorn Andersson
2021-06-17  9:07           ` Ulf Hansson
2021-06-17 16:19             ` Dmitry Baryshkov
2021-06-17 17:27               ` Bjorn Andersson
2021-06-17 17:17             ` Bjorn Andersson
2021-06-28 19:55             ` Dmitry Baryshkov
2021-06-29 11:05               ` Ulf Hansson
2021-06-29 15:09               ` Bjorn Andersson
2021-07-01 10:06                 ` Ulf Hansson [this message]
2021-07-01 11:01                   ` Dmitry Baryshkov
2021-07-01 15:14                     ` Ulf Hansson
2021-06-20  0:39   ` kernel test robot

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=CAPDyKFqSwPn7wUXB9mayT78hshDFBK+DO7cqbmZRjXNAJDQfZw@mail.gmail.com \
    --to=ulf.hansson@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=khilman@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=rnayak@codeaurora.org \
    --cc=sboyd@kernel.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).