[COMMON] fimc-is2: fix 2X5SP LTE capture cancel freeze
authorWooyeon Kim <wooy88.kim@samsung.com>
Thu, 4 Apr 2019 05:40:22 +0000 (14:40 +0900)
committerKim Gunho <gunho.kim@samsung.com>
Wed, 7 Aug 2019 13:00:36 +0000 (22:00 +0900)
 PR JIRA ID: CPR-914

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

index acd4319645d0c53a6ebf4f5bd5def76986371df8..c569d1b1c0c88edfd1febff4dde70f00f66ef338 100644 (file)
@@ -868,8 +868,17 @@ int sensor_2x5sp_cis_stream_off(struct v4l2_subdev *subdev)
        if (ret < 0)
                err("group_param_hold_func failed at stream off");
 
-       /* Sensor stream off */
        fimc_is_sensor_write16(client, 0x6028, 0x4000);
+
+       /* during LEC mode, clear 0x0BCC before stream off for next frame
+        * After cancelled, restore value
+        */
+       if (cis->long_term_mode.sen_strm_off_on_enable)
+               fimc_is_sensor_write8(client, 0x0BCC, 0);
+       else
+               fimc_is_sensor_write8(client, 0x0BCC, 0x1);
+
+       /* Sensor stream off */
        fimc_is_sensor_write8(client, 0x0100, 0x00);
 
        cis_data->stream_on = false;