mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-07 10:29:52 +00:00
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>
This commit is contained in:
@@ -583,9 +583,11 @@ static void dma_chan_issue_pending(struct dma_chan *dchan)
|
|||||||
{
|
{
|
||||||
struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
|
struct axi_dma_chan *chan = dchan_to_axi_dma_chan(dchan);
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
|
bool was_empty;
|
||||||
|
|
||||||
spin_lock_irqsave(&chan->vc.lock, flags);
|
spin_lock_irqsave(&chan->vc.lock, flags);
|
||||||
if (vchan_issue_pending(&chan->vc))
|
was_empty = list_empty(&chan->vc.desc_issued);
|
||||||
|
if (vchan_issue_pending(&chan->vc) && was_empty)
|
||||||
axi_chan_start_first_queued(chan);
|
axi_chan_start_first_queued(chan);
|
||||||
spin_unlock_irqrestore(&chan->vc.lock, flags);
|
spin_unlock_irqrestore(&chan->vc.lock, flags);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user