Re: [PATCH 2/3] dmaengine: Add DMA_CTRL_REUSE

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

 



On Thu, Jul 23, 2015 at 09:38:39PM +0200, Robert Jarzmik wrote:
> Vinod Koul <vinod.koul@xxxxxxxxx> writes:
> 
> > This adds new descriptor flag for reusing a descriptor by submitting
> > multiple times by a client, for example video buffer.
> > Add helper APIs for this as well
> >
> > Signed-off-by: Vinod Koul <vinod.koul@xxxxxxxxx>
> Hi Vinod,
> 
> Thanks for carrying this feature.
> 
> > diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h
> > index e2f5eb419976..2adcd3c1ae48 100644
> > --- a/include/linux/dmaengine.h
> > +++ b/include/linux/dmaengine.h
> > @@ -183,6 +183,8 @@ struct dma_interleaved_template {
> >   *  operation it continues the calculation with new sources
> >   * @DMA_PREP_FENCE - tell the driver that subsequent operations depend
> >   *  on the result of this operation
> > + * @DMA_CTRL_REUSE: Client can reuse the descriptor and submit again till
> Wouldn't it be better for homogeneity to have ? :
>   + * @DMA_CTRL_REUSE - client can reuse the descriptor and submit again till
> 
> > +static inline bool dmaengine_desc_test_reuse(struct dma_async_tx_descriptor *tx)
> > +{
> > +	return (tx->flags & DMA_CTRL_REUSE) == DMA_CTRL_REUSE;
> > +}
> > +
> > +static inline int dmaengine_desc_free(struct dma_async_tx_descriptor *desc)
> > +{
> > +	/* this is supported for reusable desc, so check that */
> > +	if (!dmaengine_desc_test_reuse(desc))
> Isn't that test inverted, ie. shouldn't this be :
>   +	if (dmaengine_desc_test_reuse(desc))
> 
> I'm thinking this because of my understanding of the flag, and the documentation
> you added :
Yes the check got inverted, will fix that

-- 
~Vinod

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



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux PCI]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux