From da01b594e1e3d7aafb90cad4fff8ba9082e56fbc Mon Sep 17 00:00:00 2001 From: Shubhraprakash Das Date: Fri, 29 Jan 2016 15:52:02 -0800 Subject: [PATCH] msm: camera: isp: Reduce burst count Decrement the burst count for dual stream in case of dual vfe. The count is tracked in both streams and hence should be reduced for both streams once buffer is done from both vfe. Change-Id: I681390c2b3a2a0c4861721204ac19302335bf542 Signed-off-by: Shubhraprakash Das --- .../msm/camera_v2/isp/msm_isp_axi_util.c | 17 ++++++++++++++++- 1 file changed, 16 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 1f1ed99f6225..c79a75314ac1 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 @@ -46,7 +46,8 @@ static inline struct msm_vfe_axi_stream *msm_isp_get_controllable_stream( struct vfe_device *vfe_dev, struct msm_vfe_axi_stream *stream_info) { - if (vfe_dev->is_split && stream_info->stream_src < RDI_INTF_0) + if (vfe_dev->is_split && stream_info->stream_src < RDI_INTF_0 && + stream_info->controllable_output) return msm_isp_vfe_get_stream( vfe_dev->common_data->dual_vfe_res, ISP_VFE1, @@ -3458,6 +3459,20 @@ void msm_isp_process_axi_irq_stream(struct vfe_device *vfe_dev, __func__, temp_stream->runtime_num_burst_capture); temp_stream->runtime_num_burst_capture--; + /* + * For non controllable stream decrement the burst count for + * dual stream as well here + */ + if (!stream_info->controllable_output && vfe_dev->is_split && + RDI_INTF_0 > stream_info->stream_src) { + temp_stream = msm_isp_vfe_get_stream( + vfe_dev->common_data->dual_vfe_res, + ((vfe_dev->pdev->id == ISP_VFE0) ? + ISP_VFE1 : ISP_VFE0), + HANDLE_TO_IDX( + stream_info->stream_handle)); + temp_stream->runtime_num_burst_capture--; + } } rc = msm_isp_update_deliver_count(vfe_dev, stream_info,