mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
fix(rgb_lcd): fix gdma link switch not take effect
This commit is contained in:
@@ -22,14 +22,16 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#define AXI_DMA_LL_GET_HW(id) (((id) == 0) ? (&AXI_DMA) : NULL)
|
||||
#define AXI_DMA_LL_SUPPORT(_feat) AXI_DMA_LL_SUPPORT_ ## _feat
|
||||
|
||||
// any "dummy" peripheral ID can be used for M2M mode
|
||||
#define AXI_DMA_LL_M2M_FREE_PERIPH_ID_MASK (0xFFC0)
|
||||
#define AXI_DMA_LL_RX_EVENT_MASK (0x1F)
|
||||
#if HAL_CONFIG(CHIP_SUPPORT_MIN_REV) >= 300
|
||||
#define AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH_EVENT 1
|
||||
#define AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH 1
|
||||
#define AXI_DMA_LL_TX_EVENT_MASK (0x40F)
|
||||
#else
|
||||
#define AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH 0
|
||||
#define AXI_DMA_LL_TX_EVENT_MASK (0x0F)
|
||||
#endif
|
||||
|
||||
@@ -484,7 +486,7 @@ static inline void axi_dma_ll_tx_restart(axi_dma_dev_t *dev, uint32_t channel)
|
||||
dev->out[channel].conf.out_link1.outlink_restart_chn = 1;
|
||||
}
|
||||
|
||||
#if AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH_EVENT
|
||||
#if AXI_DMA_LL_SUPPORT(TX_LINK_SWITCH)
|
||||
/**
|
||||
* @brief Request link switch done indication for TX channel
|
||||
*/
|
||||
@@ -513,7 +515,7 @@ __attribute__((always_inline))
|
||||
static inline bool axi_dma_ll_tx_is_link_switch_event_supported(axi_dma_dev_t *dev)
|
||||
{
|
||||
(void)dev;
|
||||
#if AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH_EVENT
|
||||
#if AXI_DMA_LL_SUPPORT(TX_LINK_SWITCH)
|
||||
return true;
|
||||
#else
|
||||
return false;
|
||||
|
||||
@@ -172,14 +172,14 @@ uint32_t gdma_axi_hal_get_eof_desc_addr(gdma_hal_context_t *hal, int chan_id, gd
|
||||
}
|
||||
}
|
||||
|
||||
#if AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH_EVENT
|
||||
#if AXI_DMA_LL_SUPPORT(TX_LINK_SWITCH)
|
||||
void gdma_axi_hal_request_link_switch_event(gdma_hal_context_t *hal, int chan_id, gdma_channel_direction_t dir)
|
||||
{
|
||||
if (dir == GDMA_CHANNEL_DIRECTION_TX) {
|
||||
axi_dma_ll_tx_request_link_switch_event(hal->axi_dma_dev, chan_id);
|
||||
}
|
||||
}
|
||||
#endif // AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH_EVENT
|
||||
#endif // AXI_DMA_LL_SUPPORT(TX_LINK_SWITCH)
|
||||
|
||||
#if SOC_GDMA_SUPPORT_CRC
|
||||
void gdma_axi_hal_clear_crc(gdma_hal_context_t *hal, int chan_id, gdma_channel_direction_t dir)
|
||||
@@ -283,8 +283,8 @@ void gdma_axi_hal_init(gdma_hal_context_t *hal, const gdma_hal_config_t *config)
|
||||
#endif // SOC_GDMA_SUPPORT_ETM
|
||||
|
||||
hal->is_tx_link_switch_event_supported = gdma_axi_hal_is_tx_link_switch_event_supported;
|
||||
#if AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH_EVENT
|
||||
#if AXI_DMA_LL_SUPPORT(TX_LINK_SWITCH)
|
||||
hal->request_link_switch_event = gdma_axi_hal_request_link_switch_event;
|
||||
#endif // AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH_EVENT
|
||||
#endif // AXI_DMA_LL_SUPPORT(TX_LINK_SWITCH)
|
||||
axi_dma_ll_set_default_memory_range(hal->axi_dma_dev);
|
||||
}
|
||||
|
||||
@@ -50,13 +50,12 @@
|
||||
#include "rgb_lcd_rotation_sw.h"
|
||||
#include "esp_private/sleep_retention.h"
|
||||
|
||||
#if SOC_HAS(AXI_DMA)
|
||||
#if SOC_HAS(AXI_GDMA)
|
||||
#include "hal/axi_dma_ll.h"
|
||||
#endif
|
||||
|
||||
#if AXI_DMA_LL_SUPPORT_TX_LINK_SWITCH_EVENT
|
||||
#if AXI_DMA_LL_SUPPORT(TX_LINK_SWITCH)
|
||||
#define RGB_LCD_USE_GDMA_LINK_SWITCH_EVENT 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// hardware issue workaround
|
||||
#if CONFIG_IDF_TARGET_ESP32S3
|
||||
|
||||
Reference in New Issue
Block a user