Skip to contentSkip to conversation

dmaengine: at_xdmac: Use pm_runtime_put_noidle() with many usage_counts

PATCH Applied Sakari Ailus 2 participants 2 messages Apr 10, 2025 – Apr 17, 2025

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: at_xdmac: Use pm_runtime_put_noidle() with many usage_counts

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.

---
 drivers/dma/at_xdmac.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/dma/at_xdmac.c +2 -4
index ba25c23164e7..3fbc74710a13 100644
@@ -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);
Signature · 1 line
2.39.5
maintainer Applied
#1 lore raw
Quoted 8 lines · Sakari Ailus

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.

[...]

Applied, thanks!

[1/1] dmaengine: at_xdmac: Use pm_runtime_put_noidle() with many usage_counts

      commit: 99b201481f3fe44eac5cc05238a715b05bca4df5

Best regards,

Signature · 1 line
~Vinod