[9610] fimc-is2: modified 3ap per-frame size for dzoom
authorEunyoung Lee <ey470.lee@samsung.com>
Tue, 15 May 2018 10:00:51 +0000 (19:00 +0900)
committerEunyoung Lee <ey470.lee@samsung.com>
Tue, 19 Jun 2018 08:47:51 +0000 (17:47 +0900)
Change-Id: If3be1a9572311c8ad71aed3952c1c52e633c6df7
Signed-off-by: Eunyoung Lee <ey470.lee@samsung.com>
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-param.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3aa.c
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-subdev-3ap.c

index 04491301bf4f78f9b617d06f7dfe42d70421569c..c1509ad96382730a7c45c2e3fe166514d7f1a2ed 100644 (file)
@@ -157,8 +157,8 @@ enum otf_input_order {
 };
 
 enum otf_input_path {
-       OTF_INPUT_SERIAL_PATH = 0,
-       OTF_INPUT_PARAL_PATH = 1
+       OTF_INPUT_SENSOR_PATH = 0,
+       OTF_INPUT_PAF_RDMA_PATH = 1
 };
 
 enum otf_intput_error {
@@ -767,7 +767,8 @@ struct param_otf_input {
        u32     bayer_crop_offset_y;
        u32     bayer_crop_width; /* BCrop1 output width without considering ISP margin = BDS input width */
        u32     bayer_crop_height;  /* BCrop1 output height without considering ISP margin = BDS input height */
-       u32     reserved[PARAMETER_MAX_MEMBER-11];
+       u32     source;         /* 0 : sensor, 1: paf rdma */
+       u32     reserved[PARAMETER_MAX_MEMBER-12];
        u32     err;
 };
 
index 668e02af9f5cacb06ec8906a8988e646d9665bb1..ea4003f5a51d20f3555161fd60f0f6f18f86ca74 100644 (file)
@@ -98,6 +98,8 @@ static int fimc_is_ischain_3aa_cfg(struct fimc_is_subdev *leader,
         */
 
        otf_input = fimc_is_itf_g_param(device, frame, PARAM_3AA_OTF_INPUT);
+       if (group->head->id == GROUP_ID_PAF0 || group->head->id == GROUP_ID_PAF1)
+               otf_input->source = OTF_INPUT_PAF_RDMA_PATH;
        if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) {
                otf_input->cmd = OTF_INPUT_COMMAND_ENABLE;
                otf_input->width = fimc_is_sensor_g_bns_width(device->sensor);
@@ -156,7 +158,7 @@ static int fimc_is_ischain_3aa_cfg(struct fimc_is_subdev *leader,
        else
                otf_output->cmd = OTF_OUTPUT_COMMAND_DISABLE;
 #ifdef USE_3AA_CROP_AFTER_BDS
-       if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) {
+       if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state) && (otf_input->source != OTF_INPUT_PAF_RDMA_PATH)) {
                otf_output->width = otcrop->w;
                otf_output->height = otcrop->h;
                otf_output->crop_enable = 0;
index aecc339d8f9718a24cec4951b909b181d00ad1b3..aa18e147f408a211944d3ef5198daf35d9b92933 100644 (file)
@@ -45,6 +45,7 @@ static int fimc_is_ischain_3ap_start(struct fimc_is_device_ischain *device,
        struct param_dma_output *dma_output;
        struct fimc_is_module_enum *module;
        u32 hw_format, hw_bitwidth;
+       bool paf_rdma_enable = false;
 
        FIMC_BUG(!queue);
        FIMC_BUG(!queue->framecfg.format);
@@ -54,6 +55,9 @@ static int fimc_is_ischain_3ap_start(struct fimc_is_device_ischain *device,
        hw_format = queue->framecfg.format->hw_format;
        hw_bitwidth = queue->framecfg.format->hw_bitwidth; /* memory width per pixel */
 
+       if (group->head->id == GROUP_ID_PAF0 || group->head->id == GROUP_ID_PAF1)
+               paf_rdma_enable = 1;
+
        ret = fimc_is_sensor_g_module(device->sensor, &module);
        if (ret) {
                merr("fimc_is_sensor_g_module is fail(%d)", device, ret);
@@ -71,7 +75,7 @@ static int fimc_is_ischain_3ap_start(struct fimc_is_device_ischain *device,
                goto p_err;
        }
 
-       if (otcrop->x || otcrop->y) {
+       if ((otcrop->x || otcrop->y) && (!paf_rdma_enable)) {
                mwarn("crop pos(%d, %d) is ignored", device, otcrop->x, otcrop->y);
                otcrop->x = 0;
                otcrop->y = 0;
@@ -90,7 +94,7 @@ static int fimc_is_ischain_3ap_start(struct fimc_is_device_ischain *device,
        dma_output->bitwidth = hw_bitwidth;
        dma_output->msb = MSB_OF_3AA_DMA_OUT;
 #ifdef USE_3AA_CROP_AFTER_BDS
-       if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) {
+       if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state) && (!paf_rdma_enable)) {
                dma_output->width = otcrop->w;
                dma_output->height = otcrop->h;
                dma_output->crop_enable = 0;
@@ -132,11 +136,15 @@ static int fimc_is_ischain_3ap_stop(struct fimc_is_device_ischain *device,
        int ret = 0;
        struct fimc_is_group *group;
        struct param_dma_output *dma_output;
+       bool paf_rdma_enable = false;
 
        mdbgd_ischain("%s\n", device, __func__);
 
        group = &device->group_3aa;
 
+       if (group->head->id == GROUP_ID_PAF0 || group->head->id == GROUP_ID_PAF1)
+               paf_rdma_enable = 1;
+
        if ((otcrop->w > taa_param->otf_input.bayer_crop_width) ||
                (otcrop->h > taa_param->otf_input.bayer_crop_height)) {
                mrerr("bds output size is invalid((%d, %d) > (%d, %d))", device, frame,
@@ -148,7 +156,7 @@ static int fimc_is_ischain_3ap_stop(struct fimc_is_device_ischain *device,
                goto p_err;
        }
 
-       if (otcrop->x || otcrop->y) {
+       if ((otcrop->x || otcrop->y) && (!paf_rdma_enable)) {
                mwarn("crop pos(%d, %d) is ignored", device, otcrop->x, otcrop->y);
                otcrop->x = 0;
                otcrop->y = 0;
@@ -157,7 +165,7 @@ static int fimc_is_ischain_3ap_stop(struct fimc_is_device_ischain *device,
        dma_output = fimc_is_itf_g_param(device, frame, subdev->param_dma_ot);
        dma_output->cmd = DMA_OUTPUT_COMMAND_DISABLE;
 #ifdef USE_3AA_CROP_AFTER_BDS
-       if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) {
+       if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state) && (!paf_rdma_enable)) {
                dma_output->width = otcrop->w;
                dma_output->height = otcrop->h;
                dma_output->crop_enable = 0;