From a84f3a1d0afa2aaec4ea91baadaf6178b0bdbde4 Mon Sep 17 00:00:00 2001 From: Wooyeon Kim Date: Fri, 19 Apr 2019 11:53:56 +0900 Subject: [PATCH] [HACK][9610] fimc-is2: move LTE step1 work only for 2x5 - for avoid side effect of 0x0BCC settings PR JIRA ID: CPR-974 Change-Id: I150ddaf30c636d0355bfcdbfc0c3e53d312148f0 Signed-off-by: Wooyeon Kim --- .../fimc-is-device-sensor-peri.c | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-device-sensor-peri.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-device-sensor-peri.c index a406e642eaf5..222cb660699d 100755 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-device-sensor-peri.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-device-sensor-peri.c @@ -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) { -- 2.20.1