Merge branch 'feature/dma2d_ppa_sleep_retention_support_v5.5' into 'release/v5.5'

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

See merge request espressif/esp-idf!50354
This commit is contained in:
morris
2026-07-20 10:55:54 +08:00
20 changed files with 606 additions and 157 deletions
@@ -92,7 +92,7 @@ extern "C" {
* @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;
@@ -100,14 +100,14 @@ static inline void dma2d_ll_enable_bus_clock(int group_id, bool enable)
/// use a macro to wrap the function, force the caller to use it in a critical section
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define dma2d_ll_enable_bus_clock(...) (void)__DECLARE_RCC_ATOMIC_ENV; dma2d_ll_enable_bus_clock(__VA_ARGS__)
#define dma2d_ll_enable_bus_clock(...) (void)__DECLARE_RCC_ATOMIC_ENV; _dma2d_ll_enable_bus_clock(__VA_ARGS__)
/**
* @brief Reset the 2D-DMA module
*
* @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;
@@ -116,7 +116,7 @@ static inline void dma2d_ll_reset_register(int group_id)
/// use a macro to wrap the function, force the caller to use it in a critical section
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define dma2d_ll_reset_register(...) (void)__DECLARE_RCC_ATOMIC_ENV; dma2d_ll_reset_register(__VA_ARGS__)
#define dma2d_ll_reset_register(...) (void)__DECLARE_RCC_ATOMIC_ENV; _dma2d_ll_reset_register(__VA_ARGS__)
/**
* @brief Check if the bus clock is enabled for the DMA module
+5 -5
View File
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -53,19 +53,19 @@ typedef enum {
*
* @param enable Set true to enable, false to disable
*/
static inline void ppa_ll_enable_bus_clock(bool enable)
static inline void _ppa_ll_enable_bus_clock(bool enable)
{
HP_SYS_CLKRST.soc_clk_ctrl1.reg_ppa_sys_clk_en = enable;
}
/// use a macro to wrap the function, force the caller to use it in a critical section
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define ppa_ll_enable_bus_clock(...) (void)__DECLARE_RCC_ATOMIC_ENV; ppa_ll_enable_bus_clock(__VA_ARGS__)
#define ppa_ll_enable_bus_clock(...) (void)__DECLARE_RCC_ATOMIC_ENV; _ppa_ll_enable_bus_clock(__VA_ARGS__)
/**
* @brief Reset the PPA module
*/
static inline void ppa_ll_reset_register(void)
static inline void _ppa_ll_reset_register(void)
{
HP_SYS_CLKRST.hp_rst_en1.reg_rst_en_ppa = 1;
HP_SYS_CLKRST.hp_rst_en1.reg_rst_en_ppa = 0;
@@ -73,7 +73,7 @@ static inline void ppa_ll_reset_register(void)
/// use a macro to wrap the function, force the caller to use it in a critical section
/// the critical section needs to declare the __DECLARE_RCC_ATOMIC_ENV variable in advance
#define ppa_ll_reset_register(...) (void)__DECLARE_RCC_ATOMIC_ENV; ppa_ll_reset_register(__VA_ARGS__)
#define ppa_ll_reset_register(...) (void)__DECLARE_RCC_ATOMIC_ENV; _ppa_ll_reset_register(__VA_ARGS__)
/**
* @brief Configure the RGB888 to GRAY8 color conversion coefficients for SRM and Blending (excluding Fill)