summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-03-29 14:30:49 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-03-29 14:30:49 -0700
commit4166896b94303a3f8952d9af6f06fdb7a2b1b45d (patch)
treecd4fb67f3a2bd56a2eaec1ca406a3776fc6aefe3
parent56aaf096d910a391eb39942f2268e08b5f34070a (diff)
parentc1804f4e092bc2251c25a4f5708e2405f8e73a9c (diff)
Merge "msm: isp: Fix stream off failure in LPM"
-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 54b237a9fc05..b44b7573e0e6 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
@@ -2441,7 +2441,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);
}
@@ -2455,7 +2455,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);
@@ -2813,6 +2813,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;
@@ -2879,9 +2880,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;
@@ -2894,8 +2897,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);
}