From: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Andy Shevchenko
<andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Laxman Dewangan
<ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Vinod Koul <vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
Thierry Reding
<thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Alexandre Courbot
<gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
dmaengine <dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage
Date: Tue, 10 Nov 2015 09:57:19 +0000 [thread overview]
Message-ID: <5641BF7F.9000809@nvidia.com> (raw)
In-Reply-To: <CAHp75Vd2SgjvCe+8buU98EawVDXGHk8hqWCLFVvVpshTFZSKHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 09/11/15 13:57, Andy Shevchenko wrote:
> On Mon, Nov 9, 2015 at 3:23 PM, Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> wrote:
>> The tegra-apb DMA driver enables runtime-pm but never calls
>> pm_runtime_get/put and hence the runtime-pm callbacks are never invoked.
>> The driver manages the clocks by directly calling clk_prepare_enable()
>> and clk_unprepare_disable().
>>
>> Fix this by replacing the clk_prepare_enable() and clk_disable_unprepare()
>> with pm_runtime_get_sync() and pm_runtime_put(), respectively. Note that
>> the consequence of this is that if runtime-pm is disabled, then the clocks
>> will remain on the entire time the driver is loaded. However, if
>> runtime-pm is disabled, then power is not most likely not a concern.
>
> Nitpick
>
>> @@ -1539,11 +1534,10 @@ static int tegra_dma_runtime_resume(struct device *dev)
>> static int tegra_dma_pm_suspend(struct device *dev)
>> {
>> struct tegra_dma *tdma = dev_get_drvdata(dev);
>> - int i;
>> - int ret;
>> + int i, ret;
>
>> static int tegra_dma_pm_resume(struct device *dev)
>> {
>> struct tegra_dma *tdma = dev_get_drvdata(dev);
>> - int i;
>> - int ret;
>> + int i, ret;
>
> Do you really need that?
Rhetorical question? ;-)
I can drop that.
Jon
next prev parent reply other threads:[~2015-11-10 9:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 13:23 [PATCH V2 0/6] DMA: tegra-apb: Clean-up Jon Hunter
[not found] ` <1447075429-27311-1-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-09 13:23 ` [PATCH V2 1/6] dmaengine: tegra-apb: Correct runtime-pm usage Jon Hunter
[not found] ` <1447075429-27311-2-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-09 13:57 ` Andy Shevchenko
[not found] ` <CAHp75Vd2SgjvCe+8buU98EawVDXGHk8hqWCLFVvVpshTFZSKHw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-10 9:57 ` Jon Hunter [this message]
2015-11-09 13:23 ` [PATCH V2 2/6] dmaengine: tegra-apb: Use dev_get_drvdata() Jon Hunter
2015-11-09 13:23 ` [PATCH V2 3/6] dmaengine: tegra-apb: Save and restore word count Jon Hunter
2015-11-09 13:23 ` [PATCH V2 4/6] dmaengine: tegra-apb: Only save channel state for those in use Jon Hunter
[not found] ` <1447075429-27311-5-git-send-email-jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2015-11-09 13:58 ` Andy Shevchenko
[not found] ` <CAHp75Ve77TVmc6TE-mDRvH3_jbKZvzYv0dj7WOXF0mRFa=JErg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-11-10 9:57 ` Jon Hunter
2015-11-09 13:23 ` [PATCH V2 5/6] dmaengine: tegra-apb: Update driver to use GFP_NOWAIT Jon Hunter
2015-11-09 13:23 ` [PATCH V2 6/6] dmaengine: tegra-apb: Free interrupts before killing tasklets Jon Hunter
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=5641BF7F.9000809@nvidia.com \
--to=jonathanh-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
--cc=andy.shevchenko-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=dmaengine-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=gnurou-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=ldewangan-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org \
--cc=thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=vinod.koul-ral2JQCrhuEAvxtiuMwx3w@public.gmane.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).