Re: [PATCH 2/2] dmaengine: cppi41: Add basic PM runtime support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 22, 2016 at 07:21:48AM -0700, Tony Lindgren wrote:
> Hi,
> 
> * Vinod Koul <vinod.koul@xxxxxxxxx> [160821 23:34]:
> > On Fri, Aug 19, 2016 at 03:59:40PM -0700, Tony Lindgren wrote:
> > @@ -349,6 +358,12 @@ static dma_cookie_t cppi41_tx_submit(struct dma_async_tx_descriptor *tx)
> > >  static int cppi41_dma_alloc_chan_resources(struct dma_chan *chan)
> > >  {
> > >  	struct cppi41_channel *c = to_cpp41_chan(chan);
> > > +	struct cppi41_dd *cdd = c->cdd;
> > > +	int error;
> > > +
> > > +	error = pm_runtime_get_sync(cdd->ddev.dev);
> > 
> > This will be problematic. The alloc callback are not supposed to sleep, so
> > we cannot use a _sync() call here :(
> > 
> > This is explicitly documented in Documentation/dmaengine/provider.txt
> 
> Hmm but for device_alloc_chan_resources and device_free_chan_resources
> we have "These functions can sleep" in the documentation?

which is correct :)

> 
> Maybe you got confused with the patch @@ line saying cppi41_tx_submit
> although the pm_runtime_get is in cppi41_dma_alloc_chan_resources?
> Or else I'm confused :)

Ah, I was trying to finish this before I took my lunch break and looks like
messed it up. Sorry..
Never to rush a review again!

> Anyways, if necessary we could move the call to cppi_writel out of
> cppi41_dma_alloc_chan_resources I think.

I think alloc is fine, I will take a detailed look tomorrow...

-- 
~Vinod
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux