Patch "dmaengine: at_xdmac: disable/enable clock directly on suspend/resume" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    dmaengine: at_xdmac: disable/enable clock directly on suspend/resume

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     dmaengine-at_xdmac-disable-enable-clock-directly-on-.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 573ebc5490ed734daba324fb737cd5b90b155138
Author: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>
Date:   Tue Feb 14 17:18:21 2023 +0200

    dmaengine: at_xdmac: disable/enable clock directly on suspend/resume
    
    [ Upstream commit 2de5ddb5e68c94b781b3789bca1ce52000d7d0e0 ]
    
    Runtime PM APIs for at_xdmac just plays with clk_enable()/clk_disable()
    letting aside the clk_prepare()/clk_unprepare() that needs to be
    executed as the clock is also prepared on probe. Thus instead of using
    runtime PM force suspend/resume APIs use
    clk_disable_unprepare() + pm_runtime_put_noidle() on suspend and
    clk_prepare_enable() + pm_runtime_get_noresume() on resume. This
    approach as been chosen instead of using runtime PM force suspend/resume
    with clk_unprepare()/clk_prepare() as it looks simpler and the final
    code is better.
    
    While at it added the missing pm_runtime_mark_last_busy() on suspend before
    decrementing the reference counter.
    
    Fixes: 650b0e990cbd ("dmaengine: at_xdmac: add runtime pm support")
    Signed-off-by: Claudiu Beznea <claudiu.beznea@xxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230214151827.1050280-2-claudiu.beznea@xxxxxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Stable-dep-of: 44fe8440bda5 ("dmaengine: at_xdmac: do not resume channels paused by consumers")
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
index bfc8ae2143957..7f7557e4c31d7 100644
--- a/drivers/dma/at_xdmac.c
+++ b/drivers/dma/at_xdmac.c
@@ -1993,6 +1993,7 @@ static int __maybe_unused atmel_xdmac_suspend(struct device *dev)
 
 	at_xdmac_off(atxdmac);
 	clk_disable_unprepare(atxdmac->clk);
+
 	return 0;
 }
 
@@ -2009,6 +2010,8 @@ static int __maybe_unused atmel_xdmac_resume(struct device *dev)
 	if (ret)
 		return ret;
 
+	pm_runtime_get_noresume(atxdmac->dev);
+
 	at_xdmac_axi_config(pdev);
 
 	/* Clear pending interrupts. */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux