summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrikanth Uyyala <suyyala@codeaurora.org>2019-03-27 14:21:07 +0530
committerGerrit - the friendly Code Review server <code-review@localhost>2019-07-03 23:44:01 -0700
commit8be3b55c4cc74e5e20e15a30d01ce7c19dbd39c0 (patch)
tree6656b27866126db87e8f2236386b6905c5b12e28
parent5974bd4025eab2158a28039d29a35d4afe2ec6bd (diff)
msm: camera_v2: isp: update the frame drop during error case
when pending requests are present due to drop_reconfig, avoid skip_all programming to hardware during epoch event. Change-Id: I9a56d179c30484c99c36bf1a9d60e8071fdd4a9a Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org> Signed-off-by: Sumalatha Malothu <smalot@codeaurora.org>
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp.h1
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c31
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c1
3 files changed, 19 insertions, 14 deletions
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
index a6fbb4102c2c..6074f85a828f 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp.h
@@ -753,7 +753,6 @@ struct msm_vfe_common_dev_data {
/* Irq debug Info */
struct msm_vfe_irq_dump vfe_irq_dump;
struct msm_vfe_tasklet tasklets[MAX_VFE + 1];
- uint32_t drop_reconfig;
};
struct msm_vfe_common_subdev {
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 d498ef0ae7a6..60522bdf330b 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
@@ -618,7 +618,8 @@ static void msm_isp_update_framedrop_reg(struct msm_vfe_axi_stream *stream_info,
drop_reconfig != 1)
stream_info->current_framedrop_period =
MSM_VFE_STREAM_STOP_PERIOD;
-
+ if (stream_info->controllable_output && drop_reconfig == 1)
+ stream_info->current_framedrop_period = 1;
/*
* re-configure the period pattern, only if it's not already
* set to what we want
@@ -674,9 +675,20 @@ void msm_isp_process_reg_upd_epoch_irq(struct vfe_device *vfe_dev,
break;
case MSM_ISP_COMP_IRQ_EPOCH:
if (stream_info->state == ACTIVE) {
+ struct vfe_device *temp = NULL;
+ struct msm_vfe_common_dev_data *c_data;
+ uint32_t drop_reconfig =
+ vfe_dev->isp_page->drop_reconfig;
+ if (stream_info->num_isp > 1 &&
+ vfe_dev->pdev->id == ISP_VFE0) {
+ c_data = vfe_dev->common_data;
+ temp = c_data->dual_vfe_res->vfe_dev[
+ ISP_VFE1];
+ drop_reconfig =
+ temp->isp_page->drop_reconfig;
+ }
msm_isp_update_framedrop_reg(stream_info,
- vfe_dev->common_data->drop_reconfig);
- vfe_dev->common_data->drop_reconfig = 0;
+ drop_reconfig);
}
break;
default:
@@ -2448,6 +2460,7 @@ static void msm_isp_input_enable(struct vfe_device *vfe_dev,
continue;
/* activate the input since it is deactivated */
axi_data->src_info[i].frame_id = 0;
+ vfe_dev->irq_sof_id = 0;
if (axi_data->src_info[i].input_mux != EXTERNAL_READ)
axi_data->src_info[i].active = 1;
if (i >= VFE_RAW_0 && sync_frame_id_src) {
@@ -3059,7 +3072,6 @@ static void __msm_isp_stop_axi_streams(struct vfe_device *vfe_dev,
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;
- vfe_dev->irq_sof_id = 0;
if (stream_info->controllable_output &&
stream_info->pending_buf_info.is_buf_done_pending) {
msm_isp_free_pending_buffer(vfe_dev, stream_info,
@@ -3581,10 +3593,6 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev,
pr_debug("%s:%d invalid time to request frame %d\n",
__func__, __LINE__, frame_id);
vfe_dev->isp_page->drop_reconfig = 1;
- /*keep it in vfe_dev variable also to avoid skip pattern
- * programming the variable in page can be overwritten by MCT
- */
- vfe_dev->common_data->drop_reconfig = 1;
} else if ((vfe_dev->axi_data.src_info[frame_src].active) &&
((frame_id ==
vfe_dev->axi_data.src_info[frame_src].frame_id) ||
@@ -3592,7 +3600,6 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev,
(stream_info->undelivered_request_cnt <=
MAX_BUFFERS_IN_HW)) {
vfe_dev->isp_page->drop_reconfig = 1;
- vfe_dev->common_data->drop_reconfig = 1;
pr_debug("%s: vfe_%d request_frame %d cur frame id %d pix %d\n",
__func__, vfe_dev->pdev->id, frame_id,
vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id,
@@ -4335,9 +4342,9 @@ void msm_isp_process_axi_irq_stream(struct vfe_device *vfe_dev,
if (vfe_dev->irq_sof_id < frame_id)
vfe_dev->irq_sof_id = frame_id;
- frame_id_diff = vfe_dev->irq_sof_id - frame_id;
+ frame_id_diff = vfe_dev->irq_sof_id - frame_id;
if (stream_info->controllable_output && frame_id_diff > 1) {
- /*scheduling problem need to do recovery*/
+ /* scheduling problem need to do recovery */
spin_unlock_irqrestore(&stream_info->lock, flags);
msm_isp_halt_send_error(vfe_dev,
ISP_EVENT_PING_PONG_MISMATCH);
@@ -4394,7 +4401,7 @@ void msm_isp_process_axi_irq_stream(struct vfe_device *vfe_dev,
*/
done_buf->is_drop_reconfig = 0;
if (!stream_info->buf[pingpong_bit]) {
- /*samebuffer is not re-programeed so program scratch*/
+ /* samebuffer is not re-programeed so write scratch */
msm_isp_cfg_stream_scratch(stream_info,
pingpong_status);
}
diff --git a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c
index 05c955ac7cd5..63afa0707fec 100644
--- a/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c
+++ b/drivers/media/platform/msm/camera_v2/isp/msm_isp_util.c
@@ -2292,7 +2292,6 @@ int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
vfe_dev->isp_raw1_debug = 0;
vfe_dev->isp_raw2_debug = 0;
vfe_dev->irq_sof_id = 0;
- vfe_dev->common_data->drop_reconfig = 0;
if (vfe_dev->hw_info->vfe_ops.core_ops.init_hw(vfe_dev) < 0) {
pr_err("%s: init hardware failed\n", __func__);
vfe_dev->vfe_open_cnt--;