All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frank Lee <tiny.windzz@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Frank Lee <frank@allwinnertech.com>,
	Rob Clark <robdclark@gmail.com>, Sean Paul <sean@poorly.run>,
	airlied@linux.ie, Daniel Vetter <daniel@ffwll.ch>,
	Viresh Kumar <vireshk@kernel.org>, Nishanth Menon <nm@ti.com>,
	Stephen Boyd <sboyd@kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	jcrouse@codeaurora.org, eric@anholt.net, kholk11@gmail.com,
	emil.velikov@collabora.com, gustavoars@kernel.org,
	linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
	freedreno@lists.freedesktop.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>
Subject: Re: [PATCH 2/3] opp: Add devres wrapper for dev_pm_opp_set_prop_name
Date: Fri, 30 Oct 2020 19:19:00 +0800	[thread overview]
Message-ID: <CAEExFWtYrT3psuLC0fd7cX2GrmPaYxqZK65OLUv+2s97ehz97g@mail.gmail.com> (raw)
In-Reply-To: <20201028144628.qm2t2hbzmouqkciy@vireshk-i7>

On Wed, Oct 28, 2020 at 10:46 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 28-10-20, 19:02, Frank Lee wrote:
> > On Wed, Oct 28, 2020 at 6:29 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > >
> > > On 12-10-20, 21:55, Frank Lee wrote:
> > > > From: Yangtao Li <tiny.windzz@gmail.com>
> > > >
> > > > Add devres wrapper for dev_pm_opp_set_prop_name() to simplify driver
> > > > code.
> > > >
> > > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > > Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> > > > ---
> > > >  drivers/opp/core.c     | 39 +++++++++++++++++++++++++++++++++++++++
> > > >  include/linux/pm_opp.h |  6 ++++++
> > > >  2 files changed, 45 insertions(+)
> > >
> > > On a second thought I am looking at dropping this one as you haven't
> > > added any users yet and I am afraid it will stay unused.
> >
> > Now it looks like that dev_pm_opp_set_prop_name() is used relatively less.
> > Maybe we can wait until a caller, and then pick up the patch.
>
> I am even wondering if we should be adding any of the devm_* helpers
> for now to be honest. Even for the other one we have only one user.
> Them major user of the OPP core is the CPU subsystem and it is never
> going to use these devm_* helpers as the CPU device doesn't get bound
> to a driver, it is rather a fake platform device which gets the
> cpufreq drivers probed. So the only users of these devm_* helpers is
> going to be non-CPU devices. Considering that we have only one user
> right now, it may be better to just fix it instead of adding any of
> the devm_* helpers.

GPU is also a relatively large number of opp consumers.
Most of the time, the dev_pm_opp_set_* functions will only be set once.
If don't need the driver to dynamically manage and release the opp, it
may be OK?

Yangtao

WARNING: multiple messages have this Message-ID (diff)
From: Frank Lee <tiny.windzz@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Nishanth Menon <nm@ti.com>,
	freedreno@lists.freedesktop.org,
	Frank Lee <frank@allwinnertech.com>,
	airlied@linux.ie, Viresh Kumar <vireshk@kernel.org>,
	Linux PM <linux-pm@vger.kernel.org>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	dri-devel@lists.freedesktop.org, gustavoars@kernel.org,
	Stephen Boyd <sboyd@kernel.org>,
	linux-arm-msm@vger.kernel.org, kholk11@gmail.com,
	Sean Paul <sean@poorly.run>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	emil.velikov@collabora.com
Subject: Re: [PATCH 2/3] opp: Add devres wrapper for dev_pm_opp_set_prop_name
Date: Fri, 30 Oct 2020 19:19:00 +0800	[thread overview]
Message-ID: <CAEExFWtYrT3psuLC0fd7cX2GrmPaYxqZK65OLUv+2s97ehz97g@mail.gmail.com> (raw)
In-Reply-To: <20201028144628.qm2t2hbzmouqkciy@vireshk-i7>

On Wed, Oct 28, 2020 at 10:46 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> On 28-10-20, 19:02, Frank Lee wrote:
> > On Wed, Oct 28, 2020 at 6:29 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
> > >
> > > On 12-10-20, 21:55, Frank Lee wrote:
> > > > From: Yangtao Li <tiny.windzz@gmail.com>
> > > >
> > > > Add devres wrapper for dev_pm_opp_set_prop_name() to simplify driver
> > > > code.
> > > >
> > > > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > > > Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> > > > ---
> > > >  drivers/opp/core.c     | 39 +++++++++++++++++++++++++++++++++++++++
> > > >  include/linux/pm_opp.h |  6 ++++++
> > > >  2 files changed, 45 insertions(+)
> > >
> > > On a second thought I am looking at dropping this one as you haven't
> > > added any users yet and I am afraid it will stay unused.
> >
> > Now it looks like that dev_pm_opp_set_prop_name() is used relatively less.
> > Maybe we can wait until a caller, and then pick up the patch.
>
> I am even wondering if we should be adding any of the devm_* helpers
> for now to be honest. Even for the other one we have only one user.
> Them major user of the OPP core is the CPU subsystem and it is never
> going to use these devm_* helpers as the CPU device doesn't get bound
> to a driver, it is rather a fake platform device which gets the
> cpufreq drivers probed. So the only users of these devm_* helpers is
> going to be non-CPU devices. Considering that we have only one user
> right now, it may be better to just fix it instead of adding any of
> the devm_* helpers.

GPU is also a relatively large number of opp consumers.
Most of the time, the dev_pm_opp_set_* functions will only be set once.
If don't need the driver to dynamically manage and release the opp, it
may be OK?

Yangtao
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-10-30 11:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-12 13:55 [PATCH 0/3] Introduce devm_pm_opp_set_* API Frank Lee
2020-10-12 13:55 ` Frank Lee
2020-10-12 13:55 ` [PATCH 1/3] opp: Add devres wrapper for dev_pm_opp_set_supported_hw Frank Lee
2020-10-12 13:55   ` Frank Lee
2020-10-12 13:55 ` [PATCH 2/3] opp: Add devres wrapper for dev_pm_opp_set_prop_name Frank Lee
2020-10-12 13:55   ` Frank Lee
2020-10-28 10:29   ` Viresh Kumar
2020-10-28 10:29     ` Viresh Kumar
2020-10-28 11:02     ` Frank Lee
2020-10-28 11:02       ` Frank Lee
2020-10-28 14:46       ` Viresh Kumar
2020-10-28 14:46         ` Viresh Kumar
2020-10-30 11:19         ` Frank Lee [this message]
2020-10-30 11:19           ` Frank Lee
2020-10-30 11:28           ` Viresh Kumar
2020-10-30 11:28             ` Viresh Kumar
2020-10-12 13:55 ` [PATCH 3/3] drm/msm: Convert to devm_pm_opp_set_supported_hw Frank Lee
2020-10-12 13:55   ` Frank Lee
2020-10-28  6:01   ` Viresh Kumar
2020-10-28  6:01     ` Viresh Kumar
2020-10-28  6:06 ` [PATCH 0/3] Introduce devm_pm_opp_set_* API Viresh Kumar
2020-10-28  6:06   ` Viresh Kumar
2020-10-30 11:29   ` Viresh Kumar
2020-10-30 11:29     ` Viresh Kumar

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=CAEExFWtYrT3psuLC0fd7cX2GrmPaYxqZK65OLUv+2s97ehz97g@mail.gmail.com \
    --to=tiny.windzz@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.velikov@collabora.com \
    --cc=eric@anholt.net \
    --cc=frank@allwinnertech.com \
    --cc=freedreno@lists.freedesktop.org \
    --cc=gustavoars@kernel.org \
    --cc=jcrouse@codeaurora.org \
    --cc=kholk11@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=robdclark@gmail.com \
    --cc=sboyd@kernel.org \
    --cc=sean@poorly.run \
    --cc=viresh.kumar@linaro.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 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.