From: Eunyoung Lee Date: Thu, 14 Jun 2018 06:34:47 +0000 (+0900) Subject: [COMMON] fimc-is2: Changed buf_init function as common function(vra) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=999f3ef97ddcb5db2e347499602e653cc5e11eb1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: Changed buf_init function as common function(vra) - 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 --- diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-video-vra.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-video-vra.c index 2ceaf7c25480..5b42f4051433 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-video-vra.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-video-vra.c @@ -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,