Skip to content

Commit 767a31f

Browse files
committed
dmaengine: dw-axi-dmac: Only start idle channels
Attempting to start a non-idle channel causes an error message to be logged, and is inefficient. Test for emptiness of the desc_issued list before doing so. Signed-off-by: Phil Elwell <[email protected]>
1 parent 66aef6c commit 767a31f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,11 @@ static void dma_chan_issue_pending(struct dma_chan *dchan)
536536
{
537537
struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
538538
unsigned long flags;
539+
bool was_empty;
539540

540541
spin_lock_irqsave(&chan->vc.lock, flags);
541-
if (vchan_issue_pending(&chan->vc))
542+
was_empty = list_empty(&chan->vc.desc_issued);
543+
if (vchan_issue_pending(&chan->vc) && was_empty)
542544
axi_chan_start_first_queued(chan);
543545
spin_unlock_irqrestore(&chan->vc.lock, flags);
544546
}

0 commit comments

Comments
 (0)