video: rockchip: mpp: fix some buf cache not sync issue

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I3c41ca6e373480e3b2759154ca4445318c7365b6
This commit is contained in:
Yandong Lin 2023-03-16 17:17:54 +08:00 committed by Tao Huang
parent 43526c2435
commit 9aa8154c25
2 changed files with 5 additions and 9 deletions

View File

@ -958,11 +958,9 @@ static void *rkvenc_alloc_task(struct mpp_session *session,
struct mpp_dma_buffer *bs_buf =
mpp_dma_find_buffer_fd(session->dma, fd_bs);
if (bs_buf && task->offset_bs > 0) {
mpp_dma_buf_sync(bs_buf, 0, task->offset_bs,
DMA_TO_DEVICE, false);
task->bs_buf = bs_buf;
}
if (bs_buf && task->offset_bs > 0)
mpp_dma_buf_sync(bs_buf, 0, task->offset_bs, DMA_TO_DEVICE, false);
task->bs_buf = bs_buf;
}
}
rkvenc2_setup_task_id(session->index, task);

View File

@ -203,11 +203,9 @@ static int vepu_process_reg_fd(struct mpp_session *session,
struct mpp_dma_buffer *bs_buf = mpp_dma_find_buffer_fd(session->dma, fd_bs);
task->offset_bs = mpp_query_reg_offset_info(&task->off_inf, VEPU2_REG_OUT_INDEX);
if (bs_buf && task->offset_bs > 0) {
if (bs_buf && task->offset_bs > 0)
mpp_dma_buf_sync(bs_buf, 0, task->offset_bs, DMA_TO_DEVICE, false);
task->bs_buf = bs_buf;
}
task->bs_buf = bs_buf;
}
return 0;