[PATCH v3 1/4] dmaengine: mmp-pdma support

zhangfei gao zhangfei.gao at gmail.com
Wed Aug 15 05:09:56 EDT 2012


On Wed, Aug 15, 2012 at 4:04 PM, Russell King - ARM Linux
<linux at arm.linux.org.uk> wrote:
> On Wed, Aug 15, 2012 at 03:44:35PM +0800, zhangfei gao wrote:
>> Still have one question.
>> vchan_tx_submit is sending vd node to submitted list.
>> list_add_tail(&vd->node, &vc->desc_submitted);
>>
>> While what we want is send the desc chain, including many nodes,
>> and the first desc will have call back.
>> chain 1: first -> desc -> desc -> desc
>> chain 2: first -> desc -> desc -> desc
>> Once the dma chain done, irq happen and call back from first desc.
>
> I don't understand why you want a DMA engine descriptor to represent
> one single DMA hardware scatterlist entry.  This makes much more
> difficult when reporting status, especially the DMA residue (which
> your existing driver does not support.)
>
> Why not hang several DMA hardware scatterlist entries off the same
> DMA engine descriptor?

The cookie can be used to compute tx_status.
For example, one descriptor chain has 10 descriptor, with cookie++.
tx_submit will return final cookie=9.
dma_async_is_tx_complete will use this cookie to check the status.

If using single descriptor describing big chunc of data, with only cookie.
Then driver has to directly check the dma register to get status.

I think the residue may only meaningful to cyclic dma, for audio.
For peripheral dma, irq after one descriptor chain, do we have to set it?
If needed it, how about get such info in irq.

Thanks



More information about the linux-arm-kernel mailing list