fix(camera): fixed c2m cache ops

This commit is contained in:
Armando 2024-07-23 10:50:14 +08:00
parent a70b435613
commit e06d0134f2
2 changed files with 2 additions and 2 deletions

View File

@ -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); dw_gdma_channel_enable_ctrl(chan, true);
if ((ctlr->trans.buffer != ctlr->backup_buffer) || ctlr->bk_buffer_exposed) { 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(ret == ESP_OK);
assert(ctlr->cbs.on_trans_finished); assert(ctlr->cbs.on_trans_finished);
if (ctlr->cbs.on_trans_finished) { if (ctlr->cbs.on_trans_finished) {

View File

@ -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); dw_gdma_channel_enable_ctrl(chan, true);
if ((dvp_ctlr->trans.buffer != dvp_ctlr->backup_buffer) || dvp_ctlr->bk_buffer_exposed) { 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(ret == ESP_OK);
assert(dvp_ctlr->cbs.on_trans_finished); assert(dvp_ctlr->cbs.on_trans_finished);
if (dvp_ctlr->cbs.on_trans_finished) { if (dvp_ctlr->cbs.on_trans_finished) {