mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
video: rockchip: mpp: fix jpege dma coherence issue
Allocate multiple jpeg enc cores to encode the same frame at the same time, and than there is a dma cache coherence issue when the user space copies bitstream data to another buffer. So, need to invalid cache after every core encoding done. Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com> Change-Id: I0868398f09787cdbd2be6f6a2cd3c1adbe61e4b5
This commit is contained in:
@@ -202,12 +202,13 @@ static int vepu_process_reg_fd(struct mpp_session *session,
|
||||
if (fmt == VEPU2_FMT_JPEGE) {
|
||||
task->offset_bs = mpp_query_reg_offset_info(&task->off_inf, VEPU2_REG_OUT_INDEX);
|
||||
|
||||
if (task->offset_bs > 0)
|
||||
task->dmabuf_bs = dma_buf_get(fd_bs);
|
||||
task->dmabuf_bs = dma_buf_get(fd_bs);
|
||||
|
||||
if (IS_ERR_OR_NULL(task->dmabuf_bs))
|
||||
if (IS_ERR_OR_NULL(task->dmabuf_bs)) {
|
||||
task->dmabuf_bs = NULL;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
if (task->offset_bs > 0)
|
||||
dma_buf_end_cpu_access_partial(task->dmabuf_bs, DMA_TO_DEVICE, 0,
|
||||
task->offset_bs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user