diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-05-25 10:41:13 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2012-07-01 09:15:56 -0400 |
commit | c33b644cb31899265ec5102a4ed45c44269dde95 (patch) | |
tree | b5ec2424d6420d8d16763e077debd1f68b28269e /drivers/dma | |
parent | ea1605612ca4a8c7936e155da768bb9f4e69e84f (diff) |
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')
-rw-r--r-- | drivers/dma/amba-pl08x.c | 9 |
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) | |||
1671 | spin_lock_irqsave(&plchan->lock, flags); | 1671 | spin_lock_irqsave(&plchan->lock, flags); |
1672 | list_splice_tail_init(&plchan->done_list, &head); | 1672 | list_splice_tail_init(&plchan->done_list, &head); |
1673 | 1673 | ||
1674 | /* If a new descriptor is queued, set it up plchan->at is NULL here */ | 1674 | if (plchan->at || !list_empty(&plchan->pend_list) || plchan->phychan_hold) { |
1675 | if (!list_empty(&plchan->issued_list)) { | ||
1676 | pl08x_start_next_txd(plchan); | ||
1677 | } else if (!list_empty(&plchan->pend_list) || plchan->phychan_hold) { | ||
1678 | /* | 1675 | /* |
1679 | * This channel is still in use - we have a new txd being | 1676 | * This channel is still in use - we have a new txd being |
1680 | * prepared and will soon be queued. Don't give up the | 1677 | * prepared and will soon be queued. Don't give up the |
@@ -1786,6 +1783,10 @@ static irqreturn_t pl08x_irq(int irq, void *dev) | |||
1786 | pl08x_release_mux(plchan); | 1783 | pl08x_release_mux(plchan); |
1787 | dma_cookie_complete(&tx->tx); | 1784 | dma_cookie_complete(&tx->tx); |
1788 | list_add_tail(&tx->node, &plchan->done_list); | 1785 | list_add_tail(&tx->node, &plchan->done_list); |
1786 | |||
1787 | /* And start the next descriptor */ | ||
1788 | if (!list_empty(&plchan->issued_list)) | ||
1789 | pl08x_start_next_txd(plchan); | ||
1789 | } | 1790 | } |
1790 | spin_unlock(&plchan->lock); | 1791 | spin_unlock(&plchan->lock); |
1791 | 1792 | ||