msm: camera: isp: Fix RDI stream streamoff issue

When stop the RDI stream, the wait flag should not be set to true if we
are halting the system. In the new logic, the halt will cause the system
timeout due to ispif might be stopped.
The change will stop the RDI without waiting if the VFE will be halted.

CRs-fixed: 991080
Change-Id: Ia0a7512006c1eeb15deb10b87aaff5668a7b5ef2
Signed-off-by: Jing Zhou <jzhou70@codeaurora.org>
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
This commit is contained in:
Jing Zhou 2016-04-01 15:49:56 -07:00 committed by Gerrit - the friendly Code Review server
parent 653e570ddf
commit 36edcc0d58

View file

@ -2025,24 +2025,6 @@ static void msm_isp_get_camif_update_state_and_halt(
pix_stream_cnt++;
}
if ((pix_stream_cnt) &&
(axi_data->src_info[VFE_PIX_0].input_mux != EXTERNAL_READ)) {
if (cur_pix_stream_cnt == 0 && pix_stream_cnt &&
stream_cfg_cmd->cmd == START_STREAM)
*camif_update = ENABLE_CAMIF;
else if (cur_pix_stream_cnt &&
(cur_pix_stream_cnt - pix_stream_cnt) == 0 &&
stream_cfg_cmd->cmd == STOP_STREAM)
*camif_update = DISABLE_CAMIF;
else if (cur_pix_stream_cnt &&
(cur_pix_stream_cnt - pix_stream_cnt) == 0 &&
stream_cfg_cmd->cmd == STOP_IMMEDIATELY)
*camif_update = DISABLE_CAMIF_IMMEDIATELY;
else
*camif_update = NO_UPDATE;
} else
*camif_update = NO_UPDATE;
if (vfe_dev->axi_data.num_active_stream == stream_cfg_cmd->num_streams
&& (stream_cfg_cmd->cmd == STOP_STREAM ||
stream_cfg_cmd->cmd == STOP_IMMEDIATELY))
@ -2050,6 +2032,24 @@ static void msm_isp_get_camif_update_state_and_halt(
else
*halt = 0;
if ((pix_stream_cnt) &&
(axi_data->src_info[VFE_PIX_0].input_mux != EXTERNAL_READ)) {
if (cur_pix_stream_cnt == 0 && pix_stream_cnt &&
stream_cfg_cmd->cmd == START_STREAM)
*camif_update = ENABLE_CAMIF;
else if (cur_pix_stream_cnt &&
(cur_pix_stream_cnt - pix_stream_cnt) == 0 &&
(stream_cfg_cmd->cmd == STOP_STREAM ||
stream_cfg_cmd->cmd == STOP_IMMEDIATELY)) {
if (*halt)
*camif_update = DISABLE_CAMIF_IMMEDIATELY;
else
*camif_update = DISABLE_CAMIF;
}
else
*camif_update = NO_UPDATE;
} else
*camif_update = NO_UPDATE;
}
static void msm_isp_update_camif_output_count(
@ -2734,34 +2734,20 @@ static int msm_isp_stop_axi_stream(struct vfe_device *vfe_dev,
wait_for_complete_for_this_stream = 0;
stream_info->state = STOP_PENDING;
ISP_DBG("Stop axi Stream 0x%x\n", stream_info->stream_id);
if (stream_info->stream_src == CAMIF_RAW ||
stream_info->stream_src == IDEAL_RAW) {
/* We dont get reg update IRQ for raw snapshot
* so frame skip cant be ocnfigured
*/
if ((camif_update != DISABLE_CAMIF_IMMEDIATELY) &&
(!ext_read))
if (!halt && !ext_read &&
!(stream_info->stream_type == BURST_STREAM &&
stream_info->runtime_num_burst_capture == 0))
wait_for_complete_for_this_stream = 1;
} else if (stream_info->stream_type == BURST_STREAM &&
stream_info->runtime_num_burst_capture == 0) {
/* Configure AXI writemasters to stop immediately
* since for burst case, write masters already skip
* all frames.
*/
if (stream_info->stream_src == RDI_INTF_0 ||
stream_info->stream_src == RDI_INTF_1 ||
stream_info->stream_src == RDI_INTF_2)
wait_for_complete_for_this_stream = 1;
} else {
if ((camif_update != DISABLE_CAMIF_IMMEDIATELY) &&
!halt && (!ext_read))
wait_for_complete_for_this_stream = 1;
}
ISP_DBG("%s: vfe_dev %d camif_update %d halt %d wait %d\n",
__func__, vfe_dev->pdev->id, camif_update, halt,
ISP_DBG("%s: stream 0x%x, vfe %d camif %d halt %d wait %d\n",
__func__,
stream_info->stream_id,
vfe_dev->pdev->id,
camif_update,
halt,
wait_for_complete_for_this_stream);
intf = SRC_TO_INTF(stream_info->stream_src);
if (!wait_for_complete_for_this_stream ||
stream_info->state == INACTIVE ||