From: tze.yee.ng@altera.com
To: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>,
Vinod Koul <vkoul@kernel.org>, Frank Li <Frank.Li@kernel.org>,
dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Tze Yee Ng <tze.yee.ng@altera.com>,
Adrian Ng Ho Yin <adrian.ho.yin.ng@altera.com>,
Nazim Amirul <muhammad.nazim.amirul.nazle.asmade@altera.com>
Subject: [PATCH v2 0/2] dmaengine: dw-axi-dmac: clean up DMAC enable and PM
Date: Mon, 25 May 2026 00:10:20 -0700 [thread overview]
Message-ID: <cover.1779688569.git.tze.yee.ng@altera.com> (raw)
From: Tze Yee Ng <tze.yee.ng@altera.com>
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(-)
--
2.43.7
next reply other threads:[~2026-05-25 7:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-25 7:10 tze.yee.ng [this message]
2026-05-25 7:10 ` [PATCH v2 1/2] dmaengine: dw-axi-dmac: drop redundant DMAC enable in block start tze.yee.ng
2026-05-25 7:52 ` sashiko-bot
2026-05-25 7:10 ` [PATCH v2 2/2] dmaengine: dw-axi-dmac: fix PM for system sleep and channel alloc tze.yee.ng
2026-05-25 8:21 ` sashiko-bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1779688569.git.tze.yee.ng@altera.com \
--to=tze.yee.ng@altera.com \
--cc=Eugeniy.Paltsev@synopsys.com \
--cc=Frank.Li@kernel.org \
--cc=adrian.ho.yin.ng@altera.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=muhammad.nazim.amirul.nazle.asmade@altera.com \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox