Re: [PATCHv3] DMAEngine: Define interleaved transfer request api

From: Jassi Brar
Date: Tue Sep 20 2011 - 14:09:06 EST


On 20 September 2011 22:22, Vinod Koul <vinod.koul@xxxxxxxxx> wrote:
>>  /**
>>   * enum dma_ctrl_flags - DMA flags to augment operation preparation,
>> @@ -309,6 +376,8 @@ typedef void (*dma_async_tx_callback)(void *dma_async_param);
>>   * @chan: target channel for this operation
>>   * @tx_submit: set the prepared descriptor(s) to be executed by the engine
>>   * @callback: routine to call after this operation is complete
>> + *   And after each frame if the 'frm_irq' flag is set during
>> + *   device_prep_interleaved_dma.
> Nope, if callback is set it should be called
What makes you think it won't be called? Note that it starts with _AND_
'frm_irq' would only cause the callbacks done _additionally_ after each frame.

And no, DMA_PREP_INTERRUPT can't serve that purpose because that acts at
only the end of full transfer not a part of it.

> I think frm_irq is not required
Barry doesn't need it, so yes, I'd better remove it for now and make
my life easier.


> Also for slave transfers, how do we infer direction?
I already explained to Barry. Here's it again.

At any time, the dmac driver knows if the channel, on which the xfer is
prepared/submitted is Slave or not.

SLAVE Transfer
dmaxfer_template.src_inc && !dmaxfer_template.dst_inc => DMA_TO_DEVICE
!dmaxfer_template.src_inc && dmaxfer_template.dst_inc => DMA_FROM_DEVICE

Mem->Mem Transfer
dmaxfer_template.src_inc && !dmaxfer_template.dst_inc => Meaningless
!dmaxfer_template.src_inc && dmaxfer_template.dst_inc => MemSet
--
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/