From 6461d117357a05597f7ec465ed3cb3a13e959ff4 Mon Sep 17 00:00:00 2001 From: Eunyoung Lee Date: Thu, 14 Jun 2018 15:31:00 +0900 Subject: [PATCH] [COMMON] fimc-is2: Changed buf_init function as common function(mexc) - mexc will use fimc_is_buffer_init func like other subdev. - It is possible only if the kvaddr is always enabled. Change-Id: I9460a7e0394c2a34c99aeea6f77a351e4e0b9f31 Signed-off-by: Eunyoung Lee --- .../exynos/fimc-is2/fimc-is-video-mec.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-video-mec.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-video-mec.c index b8f44eb8dd9b..412c838bbe25 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-video-mec.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-video-mec.c @@ -693,26 +693,9 @@ static void fimc_is_mexc_buffer_finish(struct vb2_buffer *vb) } } -static int fimc_is_mexc_buffer_init(struct vb2_buffer *vb) -{ - struct vb2_v4l2_buffer *vb2_v4l2_buf = to_vb2_v4l2_buffer(vb); - struct fimc_is_vb2_buf *vbuf = vb_to_fimc_is_vb2_buf(vb2_v4l2_buf); - struct fimc_is_video_ctx *vctx = vb->vb2_queue->drv_priv; - unsigned int plane; - - vbuf->ops = vctx->fimc_is_vb2_buf_ops; - - for (plane = 0; plane < vb->num_planes; ++plane) { - vbuf->kva[plane] = vbuf->ops->plane_kvaddr(vbuf, plane); - vbuf->dva[plane] = vbuf->ops->plane_dvaddr(vbuf, plane); - } - - return 0; -} - const struct vb2_ops fimc_is_mexc_qops = { .queue_setup = fimc_is_mexc_queue_setup, - .buf_init = fimc_is_mexc_buffer_init, + .buf_init = fimc_is_buffer_init, .buf_prepare = fimc_is_mexc_buffer_prepare, .buf_queue = fimc_is_mexc_buffer_queue, .buf_finish = fimc_is_mexc_buffer_finish, -- 2.20.1