summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbhishek Kondaveeti <akondave@codeaurora.org>2017-03-22 14:47:26 +0530
committerRamesh V <ramev@codeaurora.org>2017-03-22 18:00:10 +0530
commitc1804f4e092bc2251c25a4f5708e2405f8e73a9c (patch)
tree11aa9f2a899e29fa35d65ca901c23729c4be4fc9
parentc1ef16be6d3c5606edb7a23398611d010b405aa8 (diff)
msm: isp: Fix stream off failure in LPM
Don't wait for register updates if stream state is already paused. Change-Id: I690a70040a7038f6d2c8d68596b285f458eb65b6 Signed-off-by: Ramesh V <ramev@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c22
1 files changed, 16 insertions, 6 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 8488405b561a..ac8fea1760d1 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
@@ -2439,7 +2439,7 @@ int msm_isp_ab_ib_update_lpm_mode(struct vfe_device *vfe_dev, void *arg)
total_bandwidth +=
stream_info->bandwidth[
vfe_idx];
- stream_info->state = PAUSING;
+ stream_info->state = PAUSED;
}
spin_unlock_irqrestore(&stream_info->lock, flags);
}
@@ -2453,7 +2453,7 @@ int msm_isp_ab_ib_update_lpm_mode(struct vfe_device *vfe_dev, void *arg)
msm_isp_get_stream_common_data(vfe_dev,
ab_ib_vote->stream_src[i]);
spin_lock_irqsave(&stream_info->lock, flags);
- if (stream_info->state == PAUSING) {
+ if (stream_info->state == PAUSED) {
vfe_idx =
msm_isp_get_vfe_idx_for_stream(vfe_dev,
stream_info);
@@ -2811,6 +2811,7 @@ static int __msm_isp_check_stream_state(struct msm_vfe_axi_stream *stream_info,
case RESUMING:
case RESUME_PENDING:
case ACTIVE:
+ case PAUSED:
if (cmd != 0)
return -EALREADY;
break;
@@ -2877,9 +2878,11 @@ static void __msm_isp_stop_axi_streams(struct vfe_device *vfe_dev,
* those state transitions instead of directly forcing stream to
* be INACTIVE
*/
- while (stream_info->state != ACTIVE)
- __msm_isp_axi_stream_update(stream_info,
+ if (stream_info->state != PAUSED) {
+ while (stream_info->state != ACTIVE)
+ __msm_isp_axi_stream_update(stream_info,
&timestamp);
+ }
msm_isp_cfg_stream_scratch(stream_info, VFE_PING_FLAG);
msm_isp_cfg_stream_scratch(stream_info, VFE_PONG_FLAG);
stream_info->undelivered_request_cnt = 0;
@@ -2892,8 +2895,15 @@ static void __msm_isp_stop_axi_streams(struct vfe_device *vfe_dev,
vfe_dev->hw_info->vfe_ops.axi_ops.
clear_wm_irq_mask(vfe_dev, stream_info);
}
- init_completion(&stream_info->inactive_comp);
- stream_info->state = STOP_PENDING;
+ if (stream_info->state == ACTIVE) {
+ init_completion(&stream_info->inactive_comp);
+ stream_info->state = STOP_PENDING;
+ } else if (stream_info->state == PAUSED) {
+ /* don't wait for reg update */
+ stream_info->state = STOP_PENDING;
+ msm_isp_axi_stream_enable_cfg(stream_info);
+ stream_info->state = INACTIVE;
+ }
spin_unlock_irqrestore(&stream_info->lock, flags);
}