Re: [RFC] dmaengine/dma_slave: add context parameter toprep_slave_sg callback

From: Vinod Koul
Date: Wed Feb 01 2012 - 09:38:43 EST


On Wed, 2012-02-01 at 12:58 +0100, Guennadi Liakhovetski wrote:
> > The two things are completely orthogonal and shouldn't be clubbed.
> > For your issue we need a separate debate on how to solve this... I am
> > open to ideas...
>
> Well, I'm not sure whether they are necessarily always orthogonal, they
> don't seem so in my case at least. We definitely can use our approach -
> configure the channel during allocation. I _think_ we could also perform
> the configuration on a per-transfer basis, during the prepare stage, as
> this RFC is suggesting, but that definitely would require reworking the
> driver somewhat and changing the concept. The current concept is a fixed
> DMA channel allocation to slaves for as long as the slave is using DMA.
> This is simpler, avoids some overhead during operation and fits well with
> the dmaengine PRIVATE channel concept. So, given the choice, we would
> prefer to perform the configuration during channel allocation.
>
> Maybe there are cases, where the driver absolutely needs this additional
> information during allocation, in which case my proposal would be the only
> way to go for them.
what are you trying to address, sending controller specific information
at allocation or the channel allocation itself. I kind of sense both.
But apprach here is discussed is to pass paramters which are required
for each transfer, not static for a channel, hence the additional
controller specific parameter in respective prepare.
>
> I'll post an RFC soon - stay tuned:-)
Patch is always the best idea :-)

--
~Vinod

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/