[COMMON] fimc-is2: Changed buf_init function as common function(vra)
authorEunyoung Lee <ey470.lee@samsung.com>
Thu, 14 Jun 2018 06:34:47 +0000 (15:34 +0900)
committerEunyoung Lee <ey470.lee@samsung.com>
Tue, 19 Jun 2018 08:56:51 +0000 (17:56 +0900)
- vra will use fimc_is_buffer_init func like other subdev.
- It is possible only if the kvaddr is always enabled.

Change-Id: Id12a52eeea459a9e75bcdb9a4fba525e27c3a5c4
Signed-off-by: Eunyoung Lee <ey470.lee@samsung.com>
drivers/media/platform/exynos/fimc-is2/fimc-is-video-vra.c

index 2ceaf7c25480b3b72f28809c167777bae3e0dfdd..5b42f40514330a5929e72d540f72218b4ccaea4a 100644 (file)
@@ -737,26 +737,9 @@ static void fimc_is_vra_buffer_finish(struct vb2_buffer *vb)
        }
 }
 
-static int fimc_is_vra_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_vra_qops = {
        .queue_setup            = fimc_is_vra_queue_setup,
-       .buf_init               = fimc_is_vra_buffer_init,
+       .buf_init               = fimc_is_buffer_init,
        .buf_prepare            = fimc_is_vra_buffer_prepare,
        .buf_queue              = fimc_is_vra_buffer_queue,
        .buf_finish             = fimc_is_vra_buffer_finish,