From 9b77183c4f58dc8b15e1246c05143236f50cf074 Mon Sep 17 00:00:00 2001 From: Cho KyongHo Date: Tue, 11 Oct 2016 20:19:38 +0900 Subject: [PATCH] [COMMON] media: scaler: add explict cache maintenance m2m1shot now provides m2m1shot_sync_for_device/cpu() functions that explicitly cleaning or invalidating CPU caches. This patch follows "media: m2m1shot: use exynos_iovmm_map_userptr()" which separate cache maintenance from m2m1shot_map/unmap_dma_buf(). Change-Id: I8eac9cf955fff3f07aa00a6ea86f401245e21be3 Signed-off-by: Cho KyongHo --- drivers/media/platform/exynos/scaler/scaler-core.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/media/platform/exynos/scaler/scaler-core.c b/drivers/media/platform/exynos/scaler/scaler-core.c index 8c76f5fab1e9..8107128f1416 100644 --- a/drivers/media/platform/exynos/scaler/scaler-core.c +++ b/drivers/media/platform/exynos/scaler/scaler-core.c @@ -3281,6 +3281,9 @@ static int sc_m2m1shot_prepare_buffer(struct m2m1shot_context *m21ctx, return ret; } + m2m1shot_sync_for_device(m21ctx->m21dev->dev, + &buf_dma->plane[plane], dir); + return 0; } @@ -3289,6 +3292,8 @@ static void sc_m2m1shot_finish_buffer(struct m2m1shot_context *m21ctx, int plane, enum dma_data_direction dir) { + m2m1shot_sync_for_cpu(m21ctx->m21dev->dev, + &buf_dma->plane[plane], dir); m2m1shot_dma_addr_unmap(m21ctx->m21dev->dev, buf_dma, plane); m2m1shot_unmap_dma_buf(m21ctx->m21dev->dev, &buf_dma->plane[plane], dir); -- 2.20.1