Skip to content

Commit 0c10678

Browse files
Angus_Wangjamess-huang
authored andcommitted
dmaengine: pl330: pl330_tasklet init power_down by pch->active
To fix issue like this: dma-pl330 ff6d0000.dma-controller: pl330_update:1733 Unexpected! dma-pl330 ff6d0000.dma-controller: DMAC halted! The root cause is DMA clk is closed when DMA interrupt is in service. This may happen, as follow: 1. When pl330_terminate_all is called, and set pch->active false, power_down is true, call pm_runtime_put_autosuspend. 2. Then pl330_tasklet is called, if power_down is also true, call pm_runtime_put_autosuspend again. 3. DMA is opened again, because the autosuspend is asyn, it may close the DMA clk. If DMA interrupt is coming, it causes the issue. Change-Id: Ieefa3d39ed2e8923626d2ee0f95652ea7de9ca67 Reviewed-on: https://tp-biosrd-v02/gerrit/81492 Reviewed-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com> Tested-by: Jamess Huang(黃以民) <Jamess_Huang@asus.com>
1 parent 6a82a37 commit 0c10678

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/dma/pl330.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2171,7 +2171,7 @@ static void pl330_tasklet(unsigned long data)
21712171
spin_lock(&pch->thread->dmac->lock);
21722172
_stop(pch->thread);
21732173
spin_unlock(&pch->thread->dmac->lock);
2174-
power_down = true;
2174+
power_down = pch->active;
21752175
pch->active = false;
21762176
} else {
21772177
/* Make sure the PL330 Channel thread is active */

0 commit comments

Comments
 (0)