From: Saravana Kannan <saravanak@google.com>
To: Sibi Sankar <sibis@codeaurora.org>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
Kyungmin Park <kyungmin.park@samsung.com>,
Chanwoo Choi <cw00.choi@samsung.com>,
Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Android Kernel Team <kernel-team@android.com>,
Linux PM <linux-pm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 1/4] OPP: Allow required-opps even if the device doesn't have power-domains
Date: Tue, 16 Jul 2019 11:54:50 -0700 [thread overview]
Message-ID: <CAGETcx_LLj0Kd_1STijmPm+BbOK4UoY=qQ5Ruhjei3JCoOGhFw@mail.gmail.com> (raw)
In-Reply-To: <e7a5b387-fa85-15a8-8d79-fbc441c36293@codeaurora.org>
On Tue, Jul 16, 2019 at 10:18 AM Sibi Sankar <sibis@codeaurora.org> wrote:
>
> Hey Saravana,
> Thanks for taking time to post out this series.
>
> On 6/26/19 3:03 AM, Saravana Kannan wrote:
> > A Device-A can have a (minimum) performance requirement on another
> > Device-B to be able to function correctly. This performance requirement
> > on Device-B can also change based on the current performance level of
> > Device-A.
> >
> > The existing required-opps feature fits well to describe this need. So,
> > instead of limiting required-opps to point to only PM-domain devices,
> > allow it to point to any device.
> >
> > Signed-off-by: Saravana Kannan <saravanak@google.com>
> > ---
> > drivers/opp/core.c | 2 +-
> > drivers/opp/of.c | 14 --------------
> > 2 files changed, 1 insertion(+), 15 deletions(-)
> >
> > diff --git a/drivers/opp/core.c b/drivers/opp/core.c
> > index 0e7703fe733f..74c7bdc6f463 100644
> > --- a/drivers/opp/core.c
> > +++ b/drivers/opp/core.c
> > @@ -710,7 +710,7 @@ static int _set_required_opps(struct device *dev,
> > return 0;
> >
> > /* Single genpd case */
> > - if (!genpd_virt_devs) {
> > + if (!genpd_virt_devs && required_opp_tables[0]->is_genpd) {
> https://patchwork.kernel.org/patch/10940671/
> This was already removed as a part of ^^ and is in linux-next.
Thanks for the heads up.
>
> > pstate = opp->required_opps[0]->pstate;
> > ret = dev_pm_genpd_set_performance_state(dev, pstate);
> > if (ret) {
> > diff --git a/drivers/opp/of.c b/drivers/opp/of.c
> > index c10c782d15aa..7c8336e94aff 100644
> > --- a/drivers/opp/of.c
> > +++ b/drivers/opp/of.c
> > @@ -195,9 +195,6 @@ static void _opp_table_alloc_required_tables(struct opp_table *opp_table,
> > */
> > count_pd = of_count_phandle_with_args(dev->of_node, "power-domains",
> > "#power-domain-cells");
> > - if (!count_pd)
> > - goto put_np;
> > -
> > if (count_pd > 1) {
> > genpd_virt_devs = kcalloc(count, sizeof(*genpd_virt_devs),
> > GFP_KERNEL);
> > @@ -226,17 +223,6 @@ static void _opp_table_alloc_required_tables(struct opp_table *opp_table,
> >
> > if (IS_ERR(required_opp_tables[i]))
> > goto free_required_tables;
> > -
> > - /*
> > - * We only support genpd's OPPs in the "required-opps" for now,
> > - * as we don't know how much about other cases. Error out if the
> > - * required OPP doesn't belong to a genpd.
> > - */
> > - if (!required_opp_tables[i]->is_genpd) {
> > - dev_err(dev, "required-opp doesn't belong to genpd: %pOF\n",
> > - required_np);
> > - goto free_required_tables;
> > - }
>
> I expect the series to not work as is in its current state since I
> see a circular dependency here. The required-opp tables of the parent
> devfreq won't be populated until we add the opp-table of the child
> devfreq node while the child devfreq using passive governor would
> return -EPROBE_DEFER until the parent devfreq probes.
I looked into this when I wrote the patches. I thought I handled it
correctly. Let me take another look.
-Saravana
> The same applies to this patch -> https://patchwork.kernel.org/patch
> /11046147/ I posted out based on your series. So we would probably have
> to address the dependency here.
>
> > }
> >
> > goto put_np;
> >
>
> --
> Qualcomm Innovation Center, Inc.
> Qualcomm Innovation Center, Inc, is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2019-07-16 18:55 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 21:33 [PATCH v2 0/4] Add required-opps support to devfreq passive gov Saravana Kannan
2019-06-25 21:33 ` [PATCH v2 1/4] OPP: Allow required-opps even if the device doesn't have power-domains Saravana Kannan
2019-07-16 15:14 ` Sibi Sankar
2019-07-16 17:17 ` Sibi Sankar
2019-07-16 18:54 ` Saravana Kannan [this message]
2019-06-25 21:33 ` [PATCH v2 2/4] OPP: Add function to look up required OPP's for a given OPP Saravana Kannan
2019-06-25 21:33 ` [PATCH v2 3/4] PM / devfreq: Cache OPP table reference in devfreq Saravana Kannan
2019-06-26 1:57 ` Chanwoo Choi
2019-07-16 17:36 ` Sibi Sankar
2019-07-16 19:12 ` Saravana Kannan
2019-06-25 21:33 ` [PATCH v2 4/4] PM / devfreq: Add required OPPs support to passive governor Saravana Kannan
2019-06-26 1:59 ` Chanwoo Choi
[not found] ` <CGME20190625213355epcas5p3805e632818ee999a91e48ef9a610a084@epcms1p4>
2019-06-26 1:30 ` [PATCH v2 3/4] PM / devfreq: Cache OPP table reference in devfreq MyungJoo Ham
[not found] ` <CGME20190625213358epcas4p2391bcf70b54646880cbb60eae8b73acf@epcms1p1>
2019-06-26 1:31 ` [PATCH v2 4/4] PM / devfreq: Add required OPPs support to passive governor MyungJoo Ham
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='CAGETcx_LLj0Kd_1STijmPm+BbOK4UoY=qQ5Ruhjei3JCoOGhFw@mail.gmail.com' \
--to=saravanak@google.com \
--cc=cw00.choi@samsung.com \
--cc=kernel-team@android.com \
--cc=kyungmin.park@samsung.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=myungjoo.ham@samsung.com \
--cc=nm@ti.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@kernel.org \
--cc=sibis@codeaurora.org \
--cc=vireshk@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).