Skip to content

Commit 43af137

Browse files
pelwellpopcornmix
authored andcommitted
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 <phil@raspberrypi.com>
1 parent 07b3dc0 commit 43af137

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
@@ -583,9 +583,11 @@ static void dma_chan_issue_pending(struct dma_chan *dchan)
583583
{
584584
struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
585585
unsigned long flags;
586+
bool was_empty;
586587

587588
spin_lock_irqsave(&chan->vc.lock, flags);
588-
if (vchan_issue_pending(&chan->vc))
589+
was_empty = list_empty(&chan->vc.desc_issued);
590+
if (vchan_issue_pending(&chan->vc) && was_empty)
589591
axi_chan_start_first_queued(chan);
590592
spin_unlock_irqrestore(&chan->vc.lock, flags);
591593
}

0 commit comments

Comments
 (0)