Merge "msm: camera2: cpp: support skip of error frames"
diff --git a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
index aa0d88b..c9e5159 100644
--- a/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
+++ b/drivers/media/platform/msm/camera_v2/pproc/cpp/msm_cpp.c
@@ -166,7 +166,8 @@
} \
}
-static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev);
+static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev,
+ uint32_t buff_mgr_ops);
static void cpp_load_fw(struct cpp_device *cpp_dev, char *fw_name_bin);
static void cpp_timer_callback(unsigned long data);
@@ -638,13 +639,15 @@
/* delete CPP timer */
CPP_DBG("delete timer.\n");
msm_cpp_clear_timer(cpp_dev);
- msm_cpp_notify_frame_done(cpp_dev);
+ msm_cpp_notify_frame_done(cpp_dev,
+ VIDIOC_MSM_BUF_MNGR_BUF_DONE);
} else if (msg_id ==
MSM_CPP_MSG_ID_FRAME_NACK) {
pr_err("NACK error from hw!!\n");
CPP_DBG("delete timer.\n");
msm_cpp_clear_timer(cpp_dev);
- msm_cpp_notify_frame_done(cpp_dev);
+ msm_cpp_notify_frame_done(cpp_dev,
+ VIDIOC_MSM_BUF_MNGR_PUT_BUF);
}
i += cmd_len + 2;
}
@@ -1071,7 +1074,8 @@
return rc;
}
-static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev)
+static int msm_cpp_notify_frame_done(struct cpp_device *cpp_dev,
+ uint32_t buff_mgr_ops)
{
struct v4l2_event v4l2_evt;
struct msm_queue_cmd *frame_qcmd = NULL;
@@ -1107,7 +1111,7 @@
buff_mgr_info.index =
processed_frame->output_buffer_info[0].index;
rc = msm_cpp_buffer_ops(cpp_dev,
- VIDIOC_MSM_BUF_MNGR_BUF_DONE,
+ buff_mgr_ops,
&buff_mgr_info);
if (rc < 0) {
pr_err("error putting buffer\n");
@@ -1129,8 +1133,8 @@
buff_mgr_info.index =
processed_frame->output_buffer_info[1].index;
rc = msm_cpp_buffer_ops(cpp_dev,
- VIDIOC_MSM_BUF_MNGR_BUF_DONE,
- &buff_mgr_info);
+ buff_mgr_ops,
+ &buff_mgr_info);
if (rc < 0) {
pr_err("error putting buffer\n");
rc = -EINVAL;
@@ -1197,7 +1201,8 @@
if (cpp_timer.data.cpp_dev->timeout_trial_cnt >=
MSM_CPP_MAX_TIMEOUT_TRIAL) {
pr_info("Max trial reached\n");
- msm_cpp_notify_frame_done(cpp_timer.data.cpp_dev);
+ msm_cpp_notify_frame_done(cpp_timer.data.cpp_dev,
+ VIDIOC_MSM_BUF_MNGR_PUT_BUF);
cpp_timer.data.cpp_dev->timeout_trial_cnt = 0;
return;
}