Re: [PATCH v2 0/2] dmaengine: dw-axi-dmac: clean up DMAC enable and PM

From: NG, TZE YEE

Date: Wed Jun 10 2026 - 22:22:19 EST


On 25/5/2026 3:10 pm, NG, TZE YEE wrote:
> From: Tze Yee Ng <tze.yee.ng@xxxxxxxxxx>
>
> The DesignWare AXI DMAC driver enables the controller in axi_dma_resume(),
> which is invoked from the runtime PM resume path and from probe. Calling
> axi_dma_enable() again at the start of every block transfer is redundant
> on the normal path.
>
> That extra call had also masked a gap in system-sleep power management:
> with only runtime PM callbacks registered, a channel could remain allocated
> across suspend/resume while the runtime usage count stayed non-zero and
> axi_dma_runtime_resume() was not run, leaving DMAC_CFG and clocks out of
> sync with software state. Removing the per-transfer enable without fixing
> PM would make that scenario more visible.
>
> This series drops the redundant enable and adds the missing system-sleep
> and channel-allocation PM handling called out during review.
>
> Patch 1 removes axi_dma_enable() from axi_chan_block_xfer_start().
>
> Patch 2 (follow-up to review feedback from Sashiko Watanabe):
>
> - Add SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend,
> pm_runtime_force_resume) so system suspend/resume reuses the existing
> axi_dma_suspend() and axi_dma_resume() paths even when the runtime
> usage count is non-zero.
>
> - Replace pm_runtime_get() with pm_runtime_resume_and_get() in
> dma_chan_alloc_chan_resources(), with pm_runtime_put() on error paths,
> so clocks are enabled before a client can submit a transfer immediately
> after allocation.
>
> Changes in v2:
> - Add Patch 2 as a follow-up to review feedback from Sashiko Watanabe.
> - No changes to Patch 1.
>
> Niravkumar L Rabara (1):
> dmaengine: dw-axi-dmac: drop redundant DMAC enable in block start
>
> Tze Yee Ng (1):
> dmaengine: dw-axi-dmac: fix PM for system sleep and channel alloc
>
> drivers/dma/dw-axi-dmac/dw-axi-dmac-platform.c | 13 +++++++++----
> 1 file changed, 9 insertions(+), 4 deletions(-)
>

Hi,

Gentle follow-up on v2 of this dw-axi-dmac series (25 May), which adds
system-sleep PM and channel-allocation fixes per Sashiko's review.

Please let me know if anything else is needed before this can move forward.

Thanks,
Tze Yee