From e06d0134f2473d786b822dbb0ccabb1b4901e0c3 Mon Sep 17 00:00:00 2001 From: Armando Date: Tue, 23 Jul 2024 10:50:14 +0800 Subject: [PATCH] fix(camera): fixed c2m cache ops --- components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c | 2 +- components/esp_driver_cam/isp_dvp/src/esp_cam_ctlr_isp_dvp.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c b/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c index 21b09869dc..ebfcdb3fcc 100644 --- a/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c +++ b/components/esp_driver_cam/csi/src/esp_cam_ctlr_csi.c @@ -350,7 +350,7 @@ IRAM_ATTR static bool csi_dma_trans_done_callback(dw_gdma_channel_handle_t chan, dw_gdma_channel_enable_ctrl(chan, true); if ((ctlr->trans.buffer != ctlr->backup_buffer) || ctlr->bk_buffer_exposed) { - esp_err_t ret = esp_cache_msync((void *)(ctlr->trans.buffer), ctlr->trans.received_size, ESP_CACHE_MSYNC_FLAG_INVALIDATE); + esp_err_t ret = esp_cache_msync((void *)(ctlr->trans.buffer), ctlr->trans.received_size, ESP_CACHE_MSYNC_FLAG_DIR_M2C); assert(ret == ESP_OK); assert(ctlr->cbs.on_trans_finished); if (ctlr->cbs.on_trans_finished) { diff --git a/components/esp_driver_cam/isp_dvp/src/esp_cam_ctlr_isp_dvp.c b/components/esp_driver_cam/isp_dvp/src/esp_cam_ctlr_isp_dvp.c index 852b35aba1..10446d3749 100644 --- a/components/esp_driver_cam/isp_dvp/src/esp_cam_ctlr_isp_dvp.c +++ b/components/esp_driver_cam/isp_dvp/src/esp_cam_ctlr_isp_dvp.c @@ -469,7 +469,7 @@ IRAM_ATTR static bool s_dvp_dma_trans_done_callback(dw_gdma_channel_handle_t cha dw_gdma_channel_enable_ctrl(chan, true); if ((dvp_ctlr->trans.buffer != dvp_ctlr->backup_buffer) || dvp_ctlr->bk_buffer_exposed) { - esp_err_t ret = esp_cache_msync((void *)(dvp_ctlr->trans.buffer), dvp_ctlr->trans.received_size, ESP_CACHE_MSYNC_FLAG_INVALIDATE); + esp_err_t ret = esp_cache_msync((void *)(dvp_ctlr->trans.buffer), dvp_ctlr->trans.received_size, ESP_CACHE_MSYNC_FLAG_DIR_M2C); assert(ret == ESP_OK); assert(dvp_ctlr->cbs.on_trans_finished); if (dvp_ctlr->cbs.on_trans_finished) {