[COMMON] fimc-is2: add LTE mode restore when LEC is cancelled
authorWooyeon Kim <wooy88.kim@samsung.com>
Tue, 2 Apr 2019 06:37:50 +0000 (15:37 +0900)
committerlingsen1 <lingsen1@lenovo.com>
Mon, 10 Jun 2019 03:24:57 +0000 (11:24 +0800)
 PR JIRA ID: CPR-908

CRs-fixed: (CR)

Change-Id: I581f5febf2b5f6d49672b1d10b464c253f6e2d08
Signed-off-by: Wooyeon Kim <wooy88.kim@samsung.com>
Reviewed-on: https://gerrit.mot.com/1333573
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Biming Li <libm1@motorola.com>
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key

drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-device-sensor-peri.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.c

index b0f2d19fd28bc18d8af97effe1432177295579eb..b269b8b0e6e829e9b06a805cf10d30c3903c7ccd 100755 (executable)
@@ -1927,6 +1927,12 @@ int fimc_is_sensor_peri_s_stream(struct fimc_is_device_sensor *device,
                ret = CALL_CISOPS(cis, cis_stream_off, subdev_cis);
                if (ret == 0)
                        ret = CALL_CISOPS(cis, cis_wait_streamoff, subdev_cis);
+
+               if (cis->long_term_mode.sen_strm_off_on_enable) {
+                       cis->long_term_mode.sen_strm_off_on_enable = 0;
+                       ret = CALL_CISOPS(cis, cis_set_long_term_exposure, subdev_cis);
+                       info("[%s] cancelled long_exp_capture mode\n", __func__);
+               }
                mutex_unlock(&cis->control_lock);
 
 #ifdef USE_OIS_SLEEP_MODE
index 77a9d88bb37efabc532fd54c1354848e873431dc..459d64527d5b63af6b3bf52c4ae4a527e5b5a87f 100755 (executable)
@@ -3110,6 +3110,7 @@ int set_long_term_expo_mode(struct fimc_is_sensor_interface *itf,
        /* as this function called, always set true for operate */
        sensor_peri->cis.long_term_mode.sen_strm_off_on_enable = true;
        sensor_peri->cis.long_term_mode.frm_num_strm_off_on_interval = long_term_expo_mode->frm_num_strm_off_on_interval;
+       sensor_peri->cis.long_term_mode.sen_strm_off_on_step = 0;
 
        if (sensor_peri->cis.long_term_mode.sen_strm_off_on_enable) {
                for (i = 0; i < 2; i++) {