[COMMON] fimc-is2: Changed buf_init function as common function(mexc)
authorEunyoung Lee <ey470.lee@samsung.com>
Thu, 14 Jun 2018 06:31:00 +0000 (15:31 +0900)
committerEunyoung Lee <ey470.lee@samsung.com>
Tue, 19 Jun 2018 08:56:44 +0000 (17:56 +0900)
- 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 <ey470.lee@samsung.com>
drivers/media/platform/exynos/fimc-is2/fimc-is-video-mec.c

index b8f44eb8dd9b8cba54cb4b94eb7d42ac2ac4e244..412c838bbe25bfdf012e69c9fc9edfce223f3432 100644 (file)
@@ -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,