[PATCH v2 2/2] dmaengine: Add hisilicon k3 DMA engine driver
Vinod Koul
vinod.koul at intel.com
Tue Aug 20 04:27:50 EDT 2013
On Tue, Aug 20, 2013 at 03:55:05PM +0800, zhangfei gao wrote:
> There are many example keep define simple.
and there are others examples which have done the otherway. I would prefer that
way please!
> >> > why do we need the else part here?
> >> Since asynchronous mode is supported.
> >> Desc is submitted to list but may not get physical channel to run.
> > But when you pause you pause the running channel. You dont pause a descriptor.
> > So whatever you are trying to imply doesnt make sense to me.
>
> Here delete node from chan_pending, which will be quired from tasklet.
>
> The physical channel is free matched.
> dma_issue_pending will put node to d->k3_dma_issue_pending if no phy allocated.
> Tasklet do two jobs
> 1, check running channel for new request form desc_issued.
> 2, check any new chan_pending and alloc phy if available.
>
> If no phy, the node will be put in chan_pending.
> If pause does not remove from chan_pending, it may be got from tasklet
> to start a new transaction.
> So it's safe to remove from chan_pending when pause, and add back when resume.
But when you add, where do you start from, from the start of the descriptor or
the previosu position.
The point is pause-resume you dont need to do all that. Channel is paused so
just pause it by stopping exuection, not more. Then you resume by asking
controller to start from where it left off.
~Vinod
More information about the linux-arm-kernel
mailing list