[HACK][9610] fimc-is2: move LTE step1 work only for 2x5
authorWooyeon Kim <wooy88.kim@samsung.com>
Fri, 19 Apr 2019 02:53:56 +0000 (11:53 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Wed, 7 Aug 2019 13:00:22 +0000 (22:00 +0900)
 - for avoid side effect of 0x0BCC settings

 PR JIRA ID: CPR-974

Change-Id: I150ddaf30c636d0355bfcdbfc0c3e53d312148f0
Signed-off-by: Wooyeon Kim <wooy88.kim@samsung.com>
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-device-sensor-peri.c

index a406e642eaf54540075b2edc9bb6baad7d4c50a2..222cb660699d697aabd0899e9180bdb7c08e6dbd 100755 (executable)
@@ -1261,7 +1261,11 @@ int fimc_is_sensor_peri_notify_vsync(struct v4l2_subdev *subdev, void *arg)
        if (cis->long_term_mode.sen_strm_off_on_enable) {
                if ((cis->long_term_mode.frame_interval == cis->long_term_mode.frm_num_strm_off_on_interval) ||
                                (cis->long_term_mode.frame_interval <= 0)) {
-                       schedule_work(&sensor_peri->cis.long_term_mode_work);
+
+                       /* HACK: activate work at end time only for 2X5SP */
+                       if (cis->id != SENSOR_NAME_S5K2X5SP ||
+                               (cis->id == SENSOR_NAME_S5K2X5SP && cis->long_term_mode.sen_strm_off_on_step < 1))
+                               schedule_work(&sensor_peri->cis.long_term_mode_work);
                }
                if (cis->long_term_mode.frame_interval > 0)
                        cis->long_term_mode.frame_interval--;
@@ -1313,6 +1317,12 @@ int fimc_is_sensor_peri_notify_vblank(struct v4l2_subdev *subdev, void *arg)
                }
        }
 
+
+       /* HACK: activate work at end time only for 2X5SP */
+       if (sensor_peri->cis.id == SENSOR_NAME_S5K2X5SP && (sensor_peri->cis.long_term_mode.sen_strm_off_on_enable)
+       && (sensor_peri->cis.long_term_mode.sen_strm_off_on_step == 1))
+               schedule_work(&sensor_peri->cis.long_term_mode_work);
+
        return ret;
 }
 
@@ -1595,6 +1605,11 @@ void fimc_is_sensor_long_term_mode_set_work(struct work_struct *data)
        FIMC_BUG_VOID(!device);
 
        info("[%s] start\n", __func__);
+
+       step = cis->long_term_mode.sen_strm_off_on_step;
+       if (step >= 1)
+               cis->long_term_mode.sen_strm_off_on_enable = 0;
+
        /* Sensor stream off */
        ret = CALL_CISOPS(cis, cis_stream_off, subdev_cis);
        if (ret < 0) {
@@ -1619,10 +1634,6 @@ void fimc_is_sensor_long_term_mode_set_work(struct work_struct *data)
        }
        dbg_sensor(1, "[%s] stream off done\n", __func__);
 
-       step = cis->long_term_mode.sen_strm_off_on_step;
-       if (step >= 1)
-               cis->long_term_mode.sen_strm_off_on_enable = 0;
-
        /* LTE mode setting */
        ret = CALL_CISOPS(cis, cis_set_long_term_exposure, subdev_cis);
        if (ret < 0) {