Re: dmaengine/Query: What about scatter/gather for mem to mem transfers.

From: Pratyush Anand
Date: Mon Jan 02 2012 - 06:51:22 EST


On 1/2/2012 5:05 PM, Vinod Koul wrote:
On Tue, 2011-12-20 at 15:45 +0530, Pratyush Anand wrote:
> On 12/20/2011 2:51 PM, Vinod Koul wrote:
> > On Thu, 2011-12-15 at 12:26 +0530, Pratyush Anand wrote:
> >>>> That way existing mechanism would work well for you.
> >>>> You need to split the chunks properly, which is what dma would do
> >> anyway
> >>>>
> >>>
> >>> Yes, they can be split like this, but then splitting onus will go on
> >> dma
> >>> user driver, and so there would be replication of similar logic at
> >>> several places. Therefore, I was thinking to make device_prep_dma_sg
> >> as
> >>> generic by adding these flags.
> > Well I am not sure how adding flags handles this?
>
> device_prep_dma_sg has last argument as flags. dma user driver can pass
> information about inc/dec of src/dst in this flag, which can be used by
> the dma driver. I have put one such implementation at the end of mail.
with the split pre-done would we need to do this, hence the referred
implementation.


even with pre-done, some flag in this function will be needed. Because HW also need o know whether to src and dst are in incrementing or decrementing order.



--
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/