mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 11:50:43 +09:00
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: Ib1feb508c16afb4bc9ced0c3660f2b6b4a19c068 Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
This commit is contained in:
@@ -2187,7 +2187,7 @@ static void pl330_tasklet(unsigned long data)
|
||||
spin_lock(&pch->thread->dmac->lock);
|
||||
_stop(pch->thread);
|
||||
spin_unlock(&pch->thread->dmac->lock);
|
||||
power_down = true;
|
||||
power_down = pch->active;
|
||||
pch->active = false;
|
||||
} else {
|
||||
/* Make sure the PL330 Channel thread is active */
|
||||
|
||||
Reference in New Issue
Block a user