This Linux kernel change "dmaengine: sprd: Fix the incorrect start for 2-stage destination channels" is included in the Linux 5.2 release. This change is authored by Eric Long <eric.long [at] unisoc.com> on Mon May 6 15:28:30 2019 +0800. The commit for this change in Linux stable tree is 3d626a9 (patch).
dmaengine: sprd: Fix the incorrect start for 2-stage destination channels The 2-stage destination channel will be triggered by source channel automatically, which means we should not trigger it by software request. Signed-off-by: Eric Long <[email protected]> Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Vinod Koul <[email protected]>
There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.
drivers/dma/sprd-dma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c index 431e289..0f92e60 100644 --- a/drivers/dma/sprd-dma.c +++ b/drivers/dma/sprd-dma.c @@ -510,7 +510,9 @@ static void sprd_dma_start(struct sprd_dma_chn *schan) sprd_dma_set_uid(schan); sprd_dma_enable_chn(schan); - if (schan->dev_id == SPRD_DMA_SOFTWARE_UID) + if (schan->dev_id == SPRD_DMA_SOFTWARE_UID && + schan->chn_mode != SPRD_DMA_DST_CHN0 && + schan->chn_mode != SPRD_DMA_DST_CHN1) sprd_dma_soft_request(schan); }