[HACK][COMMON] fimc-is2: featured size check between per-frame and s_fmt size
authorWooyeon Kim <wooy88.kim@samsung.com>
Wed, 25 Jul 2018 05:04:13 +0000 (14:04 +0900)
committerWooyeon Kim <wooy88.kim@samsung.com>
Fri, 27 Jul 2018 00:39:04 +0000 (09:39 +0900)
 - for support Full device reprocessing in 1x3 MC-SC
   per-frame image format changing & buffer size changing is needed
 - for not affect V4l2 limitation, s_fmt size need to set to smaller than
   per-frame size. and feature size checking between per-frame and s_fmt

   PR JIRA ID: CPR-90

Change-Id: Ib966612002265c908a169bebbb67abf7eb9d09db
Signed-off-by: Wooyeon Kim <wooy88.kim@samsung.com>
drivers/media/platform/exynos/fimc-is2/fimc-is-groupmgr.c

index 81cf6ed61eb8db7d9e345a78c84e568f40e8b6aa..b381b77bfb0e21584d329cd180aadbe4f1754250 100644 (file)
@@ -171,6 +171,7 @@ static int fimc_is_gframe_check(struct fimc_is_group *gprev,
 
        device = group->device;
 
+#ifndef DISABLE_CHECK_PERFRAME_FMT_SIZE
        /*
         * perframe check
         * 1. perframe size can't exceed s_format size
@@ -185,6 +186,7 @@ static int fimc_is_gframe_check(struct fimc_is_group *gprev,
                frame->shot_ext->node_group.leader.input.cropRegion[2] = incrop->w;
                frame->shot_ext->node_group.leader.input.cropRegion[3] = incrop->h;
        }
+#endif
 
        for (capture_id = 0; capture_id < CAPTURE_NODE_MAX; ++capture_id) {
                node = &gframe->group_cfg[group->slot].capture[capture_id];
@@ -201,6 +203,7 @@ static int fimc_is_gframe_check(struct fimc_is_group *gprev,
                        goto p_err;
                }
 
+#ifndef DISABLE_CHECK_PERFRAME_FMT_SIZE
                if ((otcrop->w * otcrop->h) > (subdev->output.width * subdev->output.height)) {
                        mrwarn("[V%d][req:%d] the output size is invalid(perframe:%dx%d > subdev:%dx%d)", group, gframe,
                                node->vid, node->request,
@@ -210,7 +213,7 @@ static int fimc_is_gframe_check(struct fimc_is_group *gprev,
                        frame->shot_ext->node_group.capture[capture_id].output.cropRegion[2] = otcrop->w;
                        frame->shot_ext->node_group.capture[capture_id].output.cropRegion[3] = otcrop->h;
                }
-
+#endif
                subdev->cid = capture_id;
        }