summaryrefslogtreecommitdiffstats
path: root/drivers/dma/amba-pl08x.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2012-05-25 15:41:13 +0100
committerRussell King <rmk+kernel@arm.linux.org.uk>2012-07-01 14:15:56 +0100
commitc33b644cb31899265ec5102a4ed45c44269dde95 (patch)
treeb5ec2424d6420d8d16763e077debd1f68b28269e /drivers/dma/amba-pl08x.c
parentea1605612ca4a8c7936e155da768bb9f4e69e84f (diff)
downloadlinux-c33b644cb31899265ec5102a4ed45c44269dde95.tar.gz
linux-c33b644cb31899265ec5102a4ed45c44269dde95.tar.bz2
linux-c33b644cb31899265ec5102a4ed45c44269dde95.zip
dmaengine: PL08x: start next descriptor from irq context
Rather than waiting for the tasklet to run, we can start the next descriptor from interrupt context, as soon as we know that the previous descriptor has completed. Acked-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/dma/amba-pl08x.c')
-rw-r--r--drivers/dma/amba-pl08x.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/dma/amba-pl08x.c b/drivers/dma/amba-pl08x.c
index b6132845e65c..30b6921f094f 100644
--- a/drivers/dma/amba-pl08x.c
+++ b/drivers/dma/amba-pl08x.c
@@ -1671,10 +1671,7 @@ static void pl08x_tasklet(unsigned long data)
spin_lock_irqsave(&plchan->lock, flags);
list_splice_tail_init(&plchan->done_list, &head);
- /* If a new descriptor is queued, set it up plchan->at is NULL here */
- if (!list_empty(&plchan->issued_list)) {
- pl08x_start_next_txd(plchan);
- } else if (!list_empty(&plchan->pend_list) || plchan->phychan_hold) {
+ if (plchan->at || !list_empty(&plchan->pend_list) || plchan->phychan_hold) {
/*
* This channel is still in use - we have a new txd being
* prepared and will soon be queued. Don't give up the
@@ -1786,6 +1783,10 @@ static irqreturn_t pl08x_irq(int irq, void *dev)
pl08x_release_mux(plchan);
dma_cookie_complete(&tx->tx);
list_add_tail(&tx->node, &plchan->done_list);
+
+ /* And start the next descriptor */
+ if (!list_empty(&plchan->issued_list))
+ pl08x_start_next_txd(plchan);
}
spin_unlock(&plchan->lock);