summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authordianlujitao <dianlujitao@lineageos.org>2020-05-08 17:51:21 +0800
committerdianlujitao <dianlujitao@lineageos.org>2020-05-08 18:04:34 +0800
commit3b3ec606fa0ecd42b179663dcdc4985801ab1d81 (patch)
tree1a161e698489a34e7d52d960c1ef29a505c74da2 /drivers
parent6e75c044b6f13a165f02ceafcd3d7f0ab837d94f (diff)
msm: camera_v2: conditionality eliminate drop_reconfig flag
The flag is set to notify userspace driver, and expected to be clear there. However, our userspace driver isn't able to handle this, as a result the camera stopped working once it's set because an empty frame is always returned. This conditionality reverts bc82952bb8012641c5e74a228ab697ff6eec38e4 and 39e7df335515c3f11859901d650d47ee983fcf6a Change-Id: I598d8ffc5f2d8eb1fe387a5210e0ef97d2e3badd
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/platform/msm/camera_v2/isp/msm_isp_axi_util.c15
1 files changed, 15 insertions, 0 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 56d1ea8083c6..419d9c23d04a 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
@@ -3633,6 +3633,9 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev,
) {
pr_debug("%s:%d invalid time to request frame %d try drop_reconfig\n",
__func__, __LINE__, frame_id);
+#ifdef CONFIG_MACH_XIAOMI_JASON
+ goto error;
+#else
vfe_dev->isp_page->drop_reconfig = 1;
return 0;
} else if ((vfe_dev->axi_data.src_info[frame_src].active) &&
@@ -3647,6 +3650,7 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev,
vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id,
vfe_dev->axi_data.src_info[VFE_PIX_0].active);
return 0;
+#endif
} else if ((vfe_dev->axi_data.src_info[frame_src].active && (frame_id !=
vfe_dev->axi_data.src_info[frame_src].frame_id + vfe_dev->
axi_data.src_info[frame_src].sof_counter_step)) ||
@@ -3678,7 +3682,18 @@ static int msm_isp_request_frame(struct vfe_device *vfe_dev,
__func__, __LINE__, vfe_dev->pdev->id, frame_id,
stream_info->activated_framedrop_period,
stream_info->stream_id);
+#ifdef CONFIG_MACH_XIAOMI_JASON
+ rc = msm_isp_return_empty_buffer(vfe_dev, stream_info,
+ user_stream_id, frame_id, buf_index, frame_src);
+ if (rc < 0)
+ pr_err("%s:%d failed: return_empty_buffer src %d\n",
+ __func__, __LINE__, frame_src);
+ stream_info->current_framedrop_period =
+ MSM_VFE_STREAM_STOP_PERIOD;
+ msm_isp_cfg_framedrop_reg(stream_info);
+#else
vfe_dev->isp_page->drop_reconfig = 1;
+#endif
return 0;
}