mm-camera2:isp2: Notify dual cam drop

In case of drop due to sw sync logic in
dual camera, need to update the isp page
with the number of frames that are dropped.

Change-Id: I18c4bbf781a5f1f2bf2f48518464b2e459ac7892
Signed-off-by: Meera Gande <mgande@codeaurora.org>
This commit is contained in:
Meera Gande 2019-12-31 14:23:36 +05:30
parent 92fc776b9a
commit 9c2fbb1741
2 changed files with 9 additions and 2 deletions

View File

@ -894,6 +894,9 @@ static void msm_isp_sync_dual_cam_frame_id(
ms_res->src_info[i]->dual_hw_ms_info.index); ms_res->src_info[i]->dual_hw_ms_info.index);
} }
} }
/* the number of frames that are dropped */
vfe_dev->isp_page->dual_cam_drop =
frame_id - (src_info->frame_id + 1);
ms_res->active_src_mask |= (1 << src_info->dual_hw_ms_info.index); ms_res->active_src_mask |= (1 << src_info->dual_hw_ms_info.index);
src_info->frame_id = frame_id; src_info->frame_id = frame_id;
src_info->dual_hw_ms_info.sync_state = MSM_ISP_DUAL_CAM_SYNC; src_info->dual_hw_ms_info.sync_state = MSM_ISP_DUAL_CAM_SYNC;
@ -931,6 +934,8 @@ void msm_isp_increment_frame_id(struct vfe_device *vfe_dev,
src_info->dual_hw_ms_info.index)) { src_info->dual_hw_ms_info.index)) {
pr_err_ratelimited("Frame out of sync on vfe %d\n", pr_err_ratelimited("Frame out of sync on vfe %d\n",
vfe_dev->pdev->id); vfe_dev->pdev->id);
/* Notify to do reconfig at SW sync drop*/
vfe_dev->isp_page->dual_cam_drop_detected = 1;
/* /*
* set this isp as async mode to force * set this isp as async mode to force
*it sync again at the next sof *it sync again at the next sof
@ -2341,8 +2346,8 @@ static int msm_isp_process_done_buf(struct vfe_device *vfe_dev,
MSM_ISP_BUFFER_STATE_PUT_BUF; MSM_ISP_BUFFER_STATE_PUT_BUF;
buf->buf_debug.put_state_last ^= 1; buf->buf_debug.put_state_last ^= 1;
rc = vfe_dev->buf_mgr->ops->buf_done(vfe_dev->buf_mgr, rc = vfe_dev->buf_mgr->ops->buf_done(vfe_dev->buf_mgr,
buf->bufq_handle, buf->buf_idx, time_stamp, buf->bufq_handle, buf->buf_idx, time_stamp,
frame_id, stream_info->runtime_output_format); frame_id, stream_info->runtime_output_format);
if (rc == -EFAULT) { if (rc == -EFAULT) {
msm_isp_halt_send_error(vfe_dev, msm_isp_halt_send_error(vfe_dev,
ISP_EVENT_BUF_FATAL_ERROR); ISP_EVENT_BUF_FATAL_ERROR);

View File

@ -35,6 +35,8 @@ struct isp_kstate {
uint32_t kernel_sofid; uint32_t kernel_sofid;
uint32_t drop_reconfig; uint32_t drop_reconfig;
uint32_t vfeid; uint32_t vfeid;
uint32_t dual_cam_drop_detected;
uint32_t dual_cam_drop;
}; };
enum ISP_START_PIXEL_PATTERN { enum ISP_START_PIXEL_PATTERN {