lkml.org 
[lkml]   [2011]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] dma: shdma: transfer based runtime PM
From
Date
On Tue, 2011-08-30 at 09:12 +0200, Guennadi Liakhovetski wrote:
> On Mon, 29 Aug 2011, Vinod Koul wrote:
> > > > Something like:
> > > > /* since callback is set for last descriptor of chain, we call runtime
> > > > * put for that desc alone
> > > > */
> > > > list_for_each_entry_safe(desc, __desc, sh_chan->ld_queue, node) {
> > > > if (desc->async_tx.callback)
> > > > pm_runtime_put(device);
> > >
> > > Not all dma users have callbacks.
> > Do you have such usage today, at least I dont :)
> > Nevertheless, in tx_submit adding a simple flag in your drivers
> > descriptor structure can tell you whether to call _put() or not. Agreed?
>
> Yes, I agree, that one could make this work too. Still, I do not
> understand how and why this is better to the extent, that I have to
> reimplement my patch, retest and resubmit it. Maybe Dan or Paul have an
> opinion on this?
But wont it make code look simpler and cleaner, you don't reply on your
counters but on pm_runtime infrastructure to do the job. You juts need
to call _put/_get at right places, which IMO l;ooks lot simpler than
current approach

--
~Vinod



\
 
 \ /
  Last update: 2011-08-30 12:01    [W:0.374 / U:0.256 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site