summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrikanth Uyyala <suyyala@codeaurora.org>2018-05-04 14:30:53 +0530
committerSrikanth Uyyala <suyyala@codeaurora.org>2018-07-20 12:14:47 +0530
commitd0097debb3e40c403d40e1c5e739cc3461af7ada (patch)
treee8a343c63fccf8c583c622e5a9698441699fd941
parent3a3c7c7bb198c87204bbcd272c46c594bbc030f9 (diff)
msm: camera: skip recovery during stream off in dual vfe
in dual vfe usecase, skip pingpong mismatch recovery if one of the vfe's active stream count is zero. Change-Id: I1b4dce66ad6665e41c4185d3ac510204d40131da Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c26
1 files changed, 25 insertions, 1 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 07defdd76922..3aefd2ccbde6 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
@@ -1693,6 +1693,9 @@ void msm_isp_halt_send_error(struct vfe_device *vfe_dev, uint32_t event)
struct msm_vfe_axi_halt_cmd halt_cmd;
struct vfe_device *temp_dev = NULL;
uint32_t irq_status0 = 0, irq_status1 = 0;
+ struct vfe_device *vfe_dev_other = NULL;
+ uint32_t vfe_id_other = 0;
+ unsigned long flags;
if (atomic_read(&vfe_dev->error_info.overflow_state) !=
NO_OVERFLOW)
@@ -1700,7 +1703,28 @@ void msm_isp_halt_send_error(struct vfe_device *vfe_dev, uint32_t event)
return;
/* if there are no active streams - do not start recovery */
- if (!vfe_dev->axi_data.num_active_stream)
+ if (vfe_dev->is_split) {
+ if (vfe_dev->pdev->id == ISP_VFE0)
+ vfe_id_other = ISP_VFE1;
+ else
+ vfe_id_other = ISP_VFE0;
+
+ spin_lock_irqsave(
+ &vfe_dev->common_data->common_dev_data_lock, flags);
+ vfe_dev_other = vfe_dev->common_data->dual_vfe_res->
+ vfe_dev[vfe_id_other];
+ if (!vfe_dev->axi_data.num_active_stream ||
+ !vfe_dev_other->axi_data.num_active_stream) {
+ spin_unlock_irqrestore(
+ &vfe_dev->common_data->common_dev_data_lock,
+ flags);
+ pr_err("%s:skip the recovery as no active streams\n",
+ __func__);
+ return;
+ }
+ spin_unlock_irqrestore(
+ &vfe_dev->common_data->common_dev_data_lock, flags);
+ } else if (!vfe_dev->axi_data.num_active_stream)
return;
if (event == ISP_EVENT_PING_PONG_MISMATCH &&