Subject: [PATCH 5/5] dmaengine: sun6i: Add cyclic capability

From: [email-masked] (Vinod Koul)
Date: Fri, 11 Mar 2016 13:02:18 +0530

On Thu, Mar 10, 2016 at 11:21:34AM +0100, Jean-Francois Moine wrote:

> +
> +	if (vchan->cyclic && vchan->phy && vchan->phy->desc)
> +		return NULL;

why check for vchan->cyclic? you are setting that at the end!

> @@ -792,6 +903,11 @@ static void sun6i_dma_issue_pending(struct dma_chan *chan)
>  	spin_lock_irqsave(&vchan->vc.lock, flags);
>  
>  	if (vchan_issue_pending(&vchan->vc)) {
> +		if (vchan->phy && vchan->cyclic) {
> +			sun6i_dma_start_desc(vchan);
> +			goto out;
> +		}

Why should this be cyclic specfic, Channel start should be same for all
channels?

> +static int sun6i_dma_alloc_chan_resources(struct dma_chan *chan)
> +{
> +	struct sun6i_vchan *vchan = to_sun6i_vchan(chan);
> +
> +	vchan->cyclic = false;

why do you need to set this here?

-- 
~Vinod