From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: Ludovic Desroches <ludovic.desroches@microchip.com>,
Vinod Koul <vkoul@kernel.org>
Cc: linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org
Subject: [PATCH 1/1] dmaengine: at_xdmac: Use pm_runtime_put_noidle() with many usage_counts
Date: Thu, 10 Apr 2025 09:58:04 +0300 [thread overview]
Message-ID: <20250410065804.3676582-1-sakari.ailus@linux.intel.com> (raw)
We're holding more than one Runtime PM usage_counts in
at_xdmac_device_terminate_all(). This makes pm_runtime_mark_last_busy()
redundant and pm_runtime_put_autosuspend() misleading. Drop
pm_runtime_mark_last_busy() and use pm_runtime_put_noidle() to decrement
the usage_count, except in the case it may be the last.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/dma/at_xdmac.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index ba25c23164e7..3fbc74710a13 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -2033,10 +2033,8 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
* at_xdmac_start_xfer() for this descriptor. Now it's time
* to release it.
*/
- if (desc->active_xfer) {
- pm_runtime_put_autosuspend(atxdmac->dev);
- pm_runtime_mark_last_busy(atxdmac->dev);
- }
+ if (desc->active_xfer)
+ pm_runtime_put_noidle(atxdmac->dev);
}
clear_bit(AT_XDMAC_CHAN_IS_PAUSED, &atchan->status);
--
2.39.5
next reply other threads:[~2025-04-10 6:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-10 6:58 Sakari Ailus [this message]
2025-04-17 15:18 ` [PATCH 1/1] dmaengine: at_xdmac: Use pm_runtime_put_noidle() with many usage_counts Vinod Koul
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=20250410065804.3676582-1-sakari.ailus@linux.intel.com \
--to=sakari.ailus@linux.intel.com \
--cc=dmaengine@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=ludovic.desroches@microchip.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