feat(ppa): add sleep retention support for DMA2D and PPA

This commit is contained in:
Song Ruo Jing
2026-06-15 15:45:07 +08:00
parent 67fdf46105
commit 14d8570163
26 changed files with 690 additions and 155 deletions
@@ -110,7 +110,7 @@ extern const int dma2d_csc_param_rgb2yuv_bt709_table[3][4];
* @param group_id Group ID
* @param enable True to enable; false to disable
*/
static inline void dma2d_ll_enable_bus_clock(int group_id, bool enable)
static inline void _dma2d_ll_enable_bus_clock(int group_id, bool enable)
{
(void)group_id;
HP_SYS_CLKRST.soc_clk_ctrl1.reg_dma2d_sys_clk_en = enable;
@@ -120,7 +120,7 @@ static inline void dma2d_ll_enable_bus_clock(int group_id, bool enable)
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define dma2d_ll_enable_bus_clock(...) do { \
(void)__DECLARE_RCC_ATOMIC_ENV; \
dma2d_ll_enable_bus_clock(__VA_ARGS__); \
_dma2d_ll_enable_bus_clock(__VA_ARGS__); \
} while(0)
/**
@@ -128,7 +128,7 @@ static inline void dma2d_ll_enable_bus_clock(int group_id, bool enable)
*
* @param group_id Group ID
*/
static inline void dma2d_ll_reset_register(int group_id)
static inline void _dma2d_ll_reset_register(int group_id)
{
(void)group_id;
HP_SYS_CLKRST.hp_rst_en0.reg_rst_en_dma2d = 1;
@@ -139,7 +139,7 @@ static inline void dma2d_ll_reset_register(int group_id)
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define dma2d_ll_reset_register(...) do { \
(void)__DECLARE_RCC_ATOMIC_ENV; \
dma2d_ll_reset_register(__VA_ARGS__); \
_dma2d_ll_reset_register(__VA_ARGS__); \
} while(0)
/**