All of lore.kernel.org
 help / color / mirror / Atom feed
From: Qiang Yu <yuq825@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: rnayak@codeaurora.org, David Airlie <airlied@linux.ie>,
	Daniel Vetter <daniel@ffwll.ch>,
	linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Rafael Wysocki <rjw@rjwysocki.net>,
	Stephen Boyd <sboyd@kernel.org>, Nishanth Menon <nm@ti.com>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	lima@lists.freedesktop.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/8] drm/lima: Unconditionally call dev_pm_opp_of_remove_table()
Date: Sun, 23 Aug 2020 10:53:59 +0800	[thread overview]
Message-ID: <CAKGbVbukA=M=a5uNwPJ3=tXYVT3QTVSJKb5VJFCq2JGwV0TSCw@mail.gmail.com> (raw)
In-Reply-To: <56f1c76a0061dc3ed2d6ea115a3ba8b2e2dee9fd.1597919647.git.viresh.kumar@linaro.org>

Looks good for me, patch is:
Reviewed-by: Qiang Yu <yuq825@gmail.com>

Regards,
Qiang

On Thu, Aug 20, 2020 at 6:44 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> dev_pm_opp_of_remove_table() doesn't report any errors when it fails to
> find the OPP table with error -ENODEV (i.e. OPP table not present for
> the device). And we can call dev_pm_opp_of_remove_table()
> unconditionally here.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/gpu/drm/lima/lima_devfreq.c | 6 +-----
>  drivers/gpu/drm/lima/lima_devfreq.h | 1 -
>  2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
> index bbe02817721b..cd290d866a04 100644
> --- a/drivers/gpu/drm/lima/lima_devfreq.c
> +++ b/drivers/gpu/drm/lima/lima_devfreq.c
> @@ -105,10 +105,7 @@ void lima_devfreq_fini(struct lima_device *ldev)
>                 devfreq->devfreq = NULL;
>         }
>
> -       if (devfreq->opp_of_table_added) {
> -               dev_pm_opp_of_remove_table(ldev->dev);
> -               devfreq->opp_of_table_added = false;
> -       }
> +       dev_pm_opp_of_remove_table(ldev->dev);
>
>         if (devfreq->regulators_opp_table) {
>                 dev_pm_opp_put_regulators(devfreq->regulators_opp_table);
> @@ -162,7 +159,6 @@ int lima_devfreq_init(struct lima_device *ldev)
>         ret = dev_pm_opp_of_add_table(dev);
>         if (ret)
>                 goto err_fini;
> -       ldevfreq->opp_of_table_added = true;
>
>         lima_devfreq_reset(ldevfreq);
>
> diff --git a/drivers/gpu/drm/lima/lima_devfreq.h b/drivers/gpu/drm/lima/lima_devfreq.h
> index 5eed2975a375..2d9b3008ce77 100644
> --- a/drivers/gpu/drm/lima/lima_devfreq.h
> +++ b/drivers/gpu/drm/lima/lima_devfreq.h
> @@ -18,7 +18,6 @@ struct lima_devfreq {
>         struct opp_table *clkname_opp_table;
>         struct opp_table *regulators_opp_table;
>         struct thermal_cooling_device *cooling;
> -       bool opp_of_table_added;
>
>         ktime_t busy_time;
>         ktime_t idle_time;
> --
> 2.25.0.rc1.19.g042ed3e048af
>

WARNING: multiple messages have this Message-ID (diff)
From: Qiang Yu <yuq825@gmail.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Nishanth Menon <nm@ti.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	lima@lists.freedesktop.org, linux-pm@vger.kernel.org,
	David Airlie <airlied@linux.ie>,
	Rafael Wysocki <rjw@rjwysocki.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Stephen Boyd <sboyd@kernel.org>,
	rnayak@codeaurora.org
Subject: Re: [PATCH 2/8] drm/lima: Unconditionally call dev_pm_opp_of_remove_table()
Date: Sun, 23 Aug 2020 10:53:59 +0800	[thread overview]
Message-ID: <CAKGbVbukA=M=a5uNwPJ3=tXYVT3QTVSJKb5VJFCq2JGwV0TSCw@mail.gmail.com> (raw)
In-Reply-To: <56f1c76a0061dc3ed2d6ea115a3ba8b2e2dee9fd.1597919647.git.viresh.kumar@linaro.org>

Looks good for me, patch is:
Reviewed-by: Qiang Yu <yuq825@gmail.com>

Regards,
Qiang

On Thu, Aug 20, 2020 at 6:44 PM Viresh Kumar <viresh.kumar@linaro.org> wrote:
>
> dev_pm_opp_of_remove_table() doesn't report any errors when it fails to
> find the OPP table with error -ENODEV (i.e. OPP table not present for
> the device). And we can call dev_pm_opp_of_remove_table()
> unconditionally here.
>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
> ---
>  drivers/gpu/drm/lima/lima_devfreq.c | 6 +-----
>  drivers/gpu/drm/lima/lima_devfreq.h | 1 -
>  2 files changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/lima/lima_devfreq.c b/drivers/gpu/drm/lima/lima_devfreq.c
> index bbe02817721b..cd290d866a04 100644
> --- a/drivers/gpu/drm/lima/lima_devfreq.c
> +++ b/drivers/gpu/drm/lima/lima_devfreq.c
> @@ -105,10 +105,7 @@ void lima_devfreq_fini(struct lima_device *ldev)
>                 devfreq->devfreq = NULL;
>         }
>
> -       if (devfreq->opp_of_table_added) {
> -               dev_pm_opp_of_remove_table(ldev->dev);
> -               devfreq->opp_of_table_added = false;
> -       }
> +       dev_pm_opp_of_remove_table(ldev->dev);
>
>         if (devfreq->regulators_opp_table) {
>                 dev_pm_opp_put_regulators(devfreq->regulators_opp_table);
> @@ -162,7 +159,6 @@ int lima_devfreq_init(struct lima_device *ldev)
>         ret = dev_pm_opp_of_add_table(dev);
>         if (ret)
>                 goto err_fini;
> -       ldevfreq->opp_of_table_added = true;
>
>         lima_devfreq_reset(ldevfreq);
>
> diff --git a/drivers/gpu/drm/lima/lima_devfreq.h b/drivers/gpu/drm/lima/lima_devfreq.h
> index 5eed2975a375..2d9b3008ce77 100644
> --- a/drivers/gpu/drm/lima/lima_devfreq.h
> +++ b/drivers/gpu/drm/lima/lima_devfreq.h
> @@ -18,7 +18,6 @@ struct lima_devfreq {
>         struct opp_table *clkname_opp_table;
>         struct opp_table *regulators_opp_table;
>         struct thermal_cooling_device *cooling;
> -       bool opp_of_table_added;
>
>         ktime_t busy_time;
>         ktime_t idle_time;
> --
> 2.25.0.rc1.19.g042ed3e048af
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2020-08-23  2:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20 10:43 [PATCH 0/8] opp: Unconditionally call dev_pm_opp_of_remove_table() Viresh Kumar
2020-08-20 10:43 ` Viresh Kumar
2020-08-20 10:43 ` Viresh Kumar
2020-08-20 10:43 ` [PATCH 1/8] cpufreq: imx6q: " Viresh Kumar
2020-08-20 10:43   ` Viresh Kumar
2020-08-20 10:43 ` [PATCH 2/8] drm/lima: " Viresh Kumar
2020-08-20 10:43   ` Viresh Kumar
2020-08-23  2:53   ` Qiang Yu [this message]
2020-08-23  2:53     ` Qiang Yu
2020-08-20 10:43 ` [PATCH 3/8] drm/msm: " Viresh Kumar
2020-08-20 10:43   ` Viresh Kumar
2020-08-20 10:43 ` [PATCH 4/8] mmc: sdhci-msm: " Viresh Kumar
2020-08-24  9:51   ` Ulf Hansson
2020-08-20 10:43 ` [PATCH 5/8] spi: spi-geni-qcom: " Viresh Kumar
2020-08-20 10:43 ` [PATCH 6/8] spi: spi-qcom-qspi: " Viresh Kumar
2020-08-20 10:43 ` [PATCH 7/8] tty: serial: qcom_geni_serial: " Viresh Kumar
2020-08-20 10:43 ` [PATCH 8/8] qcom-geni-se: remove has_opp_table 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='CAKGbVbukA=M=a5uNwPJ3=tXYVT3QTVSJKb5VJFCq2JGwV0TSCw@mail.gmail.com' \
    --to=yuq825@gmail.com \
    --cc=airlied@linux.ie \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=lima@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=rnayak@codeaurora.org \
    --cc=sboyd@kernel.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@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.