From cf4198a2e3387d88234619b1df694fd279ee66a4 Mon Sep 17 00:00:00 2001 From: Ujwal Patel <ujwalp@codeaurora.org> Date: Mon, 11 Feb 2013 10:04:32 -0800 Subject: [PATCH] msm: camera: fix preview hang issue when recording is stopped During stream off, user-space context turns off stream specific write masters and waits for the ack triggered from next reg update. But due to incorrect state maintenance this ack never reaches the waiting context. Fix this by using proper state checks. Change-Id: Ibd73ebb8c6b57d15ad38ee98a7198e353242d426 Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org> --- drivers/media/video/msmb/isp/msm_isp_axi_util.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/media/video/msmb/isp/msm_isp_axi_util.c b/drivers/media/video/msmb/isp/msm_isp_axi_util.c index 699fc624020f..33db17402a23 100644 --- a/drivers/media/video/msmb/isp/msm_isp_axi_util.c +++ b/drivers/media/video/msmb/isp/msm_isp_axi_util.c @@ -625,7 +625,7 @@ void msm_isp_axi_stream_update(struct vfe_device *vfe_dev) int i; struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data; uint32_t wm_reload_mask = 0x0, reg_update_mask = 0x1; - int send_update_complete = 0; + for (i = 0; i < MAX_NUM_STREAM; i++) { if (axi_data->stream_info[i].state == START_PENDING || axi_data->stream_info[i].state == @@ -635,9 +635,6 @@ void msm_isp_axi_stream_update(struct vfe_device *vfe_dev) &wm_reload_mask, ®_update_mask); if (axi_data->stream_info[i].state == STOP_PENDING) axi_data->stream_info[i].state = STOPPING; - } else if (axi_data->stream_info[i].state == STOPPING) { - send_update_complete = 1; - axi_data->stream_info[i].state = INACTIVE; } } /*Reload AXI*/ @@ -646,7 +643,8 @@ void msm_isp_axi_stream_update(struct vfe_device *vfe_dev) /*Reg update per src*/ vfe_dev->hw_info->vfe_ops.core_ops. reg_update(vfe_dev, reg_update_mask); - if (send_update_complete) { + + if (vfe_dev->axi_data.stream_update) { ISP_DBG("%s: send update complete\n", __func__); vfe_dev->axi_data.stream_update = 0; complete(&vfe_dev->stream_config_complete); -- GitLab