summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajeev Kulkarni <krajeev@codeaurora.org>2016-12-27 15:07:22 -0800
committerJunzhe Zou <jnzhezou@codeaurora.org>2017-02-02 16:19:38 -0800
commit08bf736b8c36269d15311affa2600fb8c087a848 (patch)
treea71b93394115a52db5b29d7dc79f4b7650d8a8bd
parent8ae485387de561300993140e243e0d3022e35ebe (diff)
msm: camera: Force syncing frame ID if out-of-sync happens
In dual cam sync mode, set all source to async state if out-of-sync happens. CRs-Fixed: 1115553 Change-Id: I8d322d5d87dd30c6852052ae9f56d43273af6095 Signed-off-by: Junzhe Zou <jnzhezou@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c24
1 files changed, 22 insertions, 2 deletions
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c
index dd7d1c836809..1ddf51407884 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c
@@ -846,6 +846,7 @@ void msm_isp_increment_frame_id(struct vfe_device *vfe_dev,
enum msm_vfe_dual_hw_type dual_hw_type;
enum msm_vfe_dual_hw_ms_type ms_type;
unsigned long flags;
+ int i;
struct master_slave_resource_info *ms_res =
&vfe_dev->common_data->ms_resource;
@@ -869,8 +870,27 @@ void msm_isp_increment_frame_id(struct vfe_device *vfe_dev,
src_info->dual_hw_ms_info.index)) {
pr_err("Frame out of sync on vfe %d\n",
vfe_dev->pdev->id);
- msm_isp_halt_send_error(vfe_dev,
- ISP_EVENT_BUF_FATAL_ERROR);
+ /*
+ * set this isp as async mode to force
+ *it sync again at the next sof
+ */
+ src_info->dual_hw_ms_info.sync_state =
+ MSM_ISP_DUAL_CAM_ASYNC;
+ /*
+ * set the other isp as async mode to force
+ * it sync again at the next sof
+ */
+ for (i = 0; i < MAX_VFE * VFE_SRC_MAX; i++) {
+ if (ms_res->src_info[i] == NULL)
+ continue;
+ if (src_info == ms_res->src_info[i] ||
+ ms_res->src_info[i]->
+ active == 0)
+ continue;
+ ms_res->src_info[i]->dual_hw_ms_info.
+ sync_state =
+ MSM_ISP_DUAL_CAM_ASYNC;
+ }
}
ms_res->src_sof_mask |= (1 <<
src_info->dual_hw_ms_info.index);