From: manjugk@ti.com (G, Manjunath Kondaiah)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] OMAP: PM: DMA: Enable runtime pm
Date: Thu, 17 Feb 2011 15:50:09 +0530 [thread overview]
Message-ID: <20110217102009.GA17370@m-desktop> (raw)
In-Reply-To: <87zkpvn4mi.fsf@ti.com>
On Wed, Feb 16, 2011 at 11:47:33AM -0800, Kevin Hilman wrote:
> "G, Manjunath Kondaiah" <manjugk@ti.com> writes:
>
> > Hi Kevin,
> >
> > On Mon, Feb 14, 2011 at 02:06:53PM -0800, Kevin Hilman wrote:
> >> "G, Manjunath Kondaiah" <manjugk@ti.com> writes:
> >>
> >> > From: Manjunath G Kondaiah <manjugk@ti.com>
> >> >
> >> > Enable runtime pm and use pm_runtime_get_sync and pm_runtime_put_autosuspend
> >> > for OMAP DMA driver.
> >> >
> >> > The DMA driver uses auto suspend feature of runtime pm framework through
> >> > which the clock gets disabled automatically if there is no activity for
> >> > more than one second.
> >> >
> >> > Testing:
> >> > Compile: omap1_defconfig and omap2plus_defconfig
> >> > Boot: OMAP1710(H3), OMAP2420(H4), OMAP3630(Zoom3), OMAP4(Blaze)
> >>
> >> The normal DMA tests should also be run on these platforms. Based on
> >> the above, I can't tell any DMA tests were run. Based on my tests,
> >> this isn't working for chained xfers.
> >>
> >> Using the runtime PM sysfs interface, you can check the runtime status
> >> of the device:
> >>
> >> # cat /sys/devices/platform/omap/omap_dma_system.0/power/runtime_status
> >>
> >> It should show 'active' during transfer, and after timeout expires it
> >> will show 'suspended'.
> >>
> >> Doing some tests using my dmatest module:
> >>
> >> git://gitorious.org/omap-test/dmatest.git
> >>
> >> I noticed that it gets stuck in 'active' and never gets suspended when I
> >> used DMA channel linking (load module using 'linking=1' as load-time option)
> >>
> >> I'm not sure exactly why, but I will guess that the reason is that there
> >> is an imbalance in get/put calls when using chaining, since 'get' is
> >> only called once upon omap_start_dma() but 'put' is called for every
> >> channel in the callback.
> >
> > Even I noticed this after running chaining test case and checking
> > runtime status. But, I am wondering even with 'active' runtime status,
> > the core hits off and retention.
>
> Probably because system DMA is auto-idle and clocked by the core_l3_iclk
>
> > The complete log which has all the sequences of running chaining tests,
> > enabling off mode and checking runtime status is available at:
> > http://pastebin.com/YEHMEXUP
> >
> > Though I agree on the point that, it is mismatch with get/put calls with
> > DMA chaining, I still need to analyze this in detail.
>
> Yes. The mismatch highlights an underlying problem.
>
> > The other thing which is not considered here is, the get_sync is called
> > inside start_dma only(request_dma will call get_sync and put after the
> > getting requested channel). After request_dma and start_dma, there are
> > API's called by user(dma_set_params, priority etc) which also require
> > get_sync since those API's will access configuration registers. I am
> > wondering if have get_sync and put in all the API's, this might result
> > in over loading.
>
> I'm not sure what you mean by over loading.
>
> You need to have all register accesses inside get/put calls. As long as
> they are balanced, this should not leed to problems.
I mean, almost all the api's will have get_sync and put_autosuspend
calls. If it is acceptable, let me check the same with implementation.
I feel this is equivalent to placing get_sync and put_autosuspend with
low level read/write api's.
-Manjunath
next prev parent reply other threads:[~2011-02-17 10:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-07 12:38 [PATCH v2] OMAP: PM: DMA: Enable runtime pm G, Manjunath Kondaiah
2011-02-10 18:48 ` G, Manjunath Kondaiah
2011-02-14 22:06 ` Kevin Hilman
2011-02-16 14:05 ` G, Manjunath Kondaiah
2011-02-16 19:47 ` Kevin Hilman
2011-02-17 10:20 ` G, Manjunath Kondaiah [this message]
2011-02-19 13:39 ` G, Manjunath Kondaiah
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=20110217102009.GA17370@m-desktop \
--to=manjugk@ti.com \
--cc=linux-arm-kernel@lists.infradead.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).