[COMMON] fimc-is2: fix register setting error when dual_sync is disable
authorxff <fangfang.xu@samsung.com>
Tue, 12 Mar 2019 08:33:43 +0000 (16:33 +0800)
committerxiest1 <xiest1@lenovo.com>
Tue, 5 Nov 2019 09:31:54 +0000 (17:31 +0800)
CRs-fixed: (CR)

Change-Id: I804ae664a2c578e24b0c52960d43c78424e978c8
Signed-off-by: xff <fangfang.xu@samsung.com>
Reviewed-on: https://gerrit.mot.com/1319592
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
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/cis/fimc-is-cis-12a10.c

index dbb7eacec606587341b21c295619310a2ae12e03..f7e409f24aedd1814f111c11cfdc8a1ed6fe0958 100755 (executable)
@@ -880,12 +880,15 @@ int sensor_12a10_cis_set_frame_duration(struct v4l2_subdev *subdev, u32 frame_du
        ret = fimc_is_sensor_write16(client, 0x380e, frame_length_lines);
        if (ret < 0)
                goto p_err;
-       ret = fimc_is_sensor_write8(client, 0x3826, ((frame_length_lines * 2 - 4) & 0xFF00) >> 8);
-       if (ret < 0)
-               goto p_err;
-       ret = fimc_is_sensor_write8(client, 0x3827, (frame_length_lines * 2 - 4) & 0xFF);
-       if (ret < 0)
-               goto p_err;
+       if(cis_data->dual_sync_enable)
+       {
+               ret = fimc_is_sensor_write8(client, 0x3826, ((frame_length_lines * 2 - 4) & 0xFF00) >> 8);
+               if (ret < 0)
+                       goto p_err;
+               ret = fimc_is_sensor_write8(client, 0x3827, (frame_length_lines * 2 - 4) & 0xFF);
+               if (ret < 0)
+                       goto p_err;
+       }
 
        cis_data->cur_frame_us_time = frame_duration;
        cis_data->frame_length_lines = frame_length_lines;