From f5640f2c8444ce462e45e94edfe6e4cc6ccbb070 Mon Sep 17 00:00:00 2001 From: Shubhraprakash Das Date: Tue, 13 Sep 2016 21:09:11 -0700 Subject: [PATCH] msm: camera: isp: Initialize completion structure When setting the stream satte to UPDATING the active completion should be initialized since we wait on that completion. CRs-Fixed: 1064457 Change-Id: Ia17d8fb224ef2709761f03464aaf2d4541566817 Signed-off-by: Shubhraprakash Das --- drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 543ab56d5bfb..9a53d3b23b7c 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 @@ -1412,6 +1412,7 @@ static void __msm_isp_axi_stream_update( switch (stream_info->state) { case UPDATING: stream_info->state = ACTIVE; + complete_all(&stream_info->active_comp); break; case STOP_PENDING: msm_isp_axi_stream_enable_cfg(stream_info); @@ -3388,8 +3389,10 @@ static void msm_isp_remove_buf_queue(struct vfe_device *vfe_dev, if (stream_info->bufq_handle[bufq_id]) { stream_info->bufq_handle[bufq_id] = 0; - if (stream_info->state == ACTIVE) + if (stream_info->state == ACTIVE) { + init_completion(&stream_info->active_comp); stream_info->state = UPDATING; + } } spin_unlock_irqrestore(&stream_info->lock, flags); if (stream_info->state == UPDATING)