On Thursday 11 June 2009, Tivy, Robert wrote:
>        EDMA requires physically contiguous buffers,
> so in addition to needing to know the physical address, 
> you also must ensure that your buffers are contiguous physically,

Not really.  The usual way to handle that sort of thing is
to make whatever user-to-kernel mapping call you need,
which returns something along the lines of a scatterlist.
Then just construct a chain of DMA transfers, one for
each segment.

So a 12 Kbyte userspace buffer might scan three pages:

        page N+0 offset 1K, len 3K
        page N+1 offset 0, len 4K
        page N+2 offset 0, len 1K

Map that to the kernel, and it'll still be three pages but
the page addresses will differ ... say, pages X, Y, and Z.
Offsets and lengths will be unchanged.  Now just feed EDMA
a chain of three transfers.

That kind of logic is easy to wrap in utility functions.
(If it were wrapped, would non-DSP code really need CMEM?)

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to