summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2018-06-19 08:12:53 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2018-06-19 08:12:53 -0700
commitcd77641c8d407d0e8019060bdfa3dc2e26814072 (patch)
treefb2f7911ed238fd33359e197526ad2388e17d64a
parentd146f75a7e67c2bae2c535ca1dad96ab1ca422e6 (diff)
parentab4b239854cf4999ca37f01c169b38c8123cbbee (diff)
Merge "ais: support frame drop configuration for auto"
-rw-r--r--drivers/media/platform/msm/ais/isp/msm_isp_axi_util.c29
-rw-r--r--drivers/media/platform/msm/ais/isp/msm_isp_axi_util.h1
-rw-r--r--drivers/media/platform/msm/ais/isp/msm_isp_util.c5
-rw-r--r--include/uapi/media/ais/msm_ais_isp.h12
4 files changed, 46 insertions, 1 deletions
diff --git a/drivers/media/platform/msm/ais/isp/msm_isp_axi_util.c b/drivers/media/platform/msm/ais/isp/msm_isp_axi_util.c
index bfccb06407f7..f135cfcd6ccd 100644
--- a/drivers/media/platform/msm/ais/isp/msm_isp_axi_util.c
+++ b/drivers/media/platform/msm/ais/isp/msm_isp_axi_util.c
@@ -2838,7 +2838,6 @@ static int msm_isp_start_axi_stream(struct vfe_device *vfe_dev,
msm_isp_get_stream_wm_mask(stream_info, &wm_reload_mask);
spin_lock_irqsave(&stream_info->lock, flags);
- msm_isp_reset_framedrop(vfe_dev, stream_info);
rc = msm_isp_init_stream_ping_pong_reg(vfe_dev, stream_info);
if (rc < 0) {
pr_err("%s: No buffer for stream%d\n", __func__,
@@ -3586,6 +3585,11 @@ int msm_isp_axi_output_cfg(struct vfe_device *vfe_dev, void *arg)
pstream_info, plane_idx);
}
+ vfe_dev->hw_info->vfe_ops.axi_ops.cfg_framedrop(
+ vfe_dev->vfe_base, pstream_info,
+ pCmd->output_path_cfg[axi_src_idx].framedrop_pattern,
+ pCmd->output_path_cfg[axi_src_idx].framedrop_period);
+
if (axi_src_idx <= PIX_ENCODER && axi_src_idx <= IDEAL_RAW) {
if (axi_src_idx == CAMIF_RAW) {
vfe_dev->axi_data.src_info[VFE_PIX_0].
@@ -3626,6 +3630,29 @@ int msm_isp_axi_output_cfg(struct vfe_device *vfe_dev, void *arg)
return rc;
}
+void msm_isp_framedrop_update(struct vfe_device *vfe_dev, void *arg)
+{
+ struct msm_vfe_axi_framedrop_update *pCmd = arg;
+ struct msm_vfe_axi_shared_data *axi_data = &vfe_dev->axi_data;
+ struct msm_vfe_axi_stream *pstream_info;
+
+ pr_debug("%s: entry\n", __func__);
+
+ if (pCmd->stream_src < VFE_AXI_SRC_MAX) {
+
+ pstream_info = &axi_data->stream_info[pCmd->stream_src];
+
+ vfe_dev->hw_info->vfe_ops.axi_ops.cfg_framedrop(
+ vfe_dev->vfe_base, pstream_info,
+ pCmd->framedrop_pattern,
+ pCmd->framedrop_period);
+
+ vfe_dev->hw_info->vfe_ops.core_ops.reg_update(
+ vfe_dev, SRC_TO_INTF(pstream_info->stream_src));
+ }
+
+ pr_debug("%s: exit\n", __func__);
+}
int msm_isp_update_axi_stream(struct vfe_device *vfe_dev, void *arg)
{
diff --git a/drivers/media/platform/msm/ais/isp/msm_isp_axi_util.h b/drivers/media/platform/msm/ais/isp/msm_isp_axi_util.h
index 7babd750a05a..d695c4c0edf3 100644
--- a/drivers/media/platform/msm/ais/isp/msm_isp_axi_util.h
+++ b/drivers/media/platform/msm/ais/isp/msm_isp_axi_util.h
@@ -84,6 +84,7 @@ int msm_isp_axi_restart(struct vfe_device *vfe_dev,
int msm_isp_axi_output_cfg(struct vfe_device *vfe_dev, void *arg);
+void msm_isp_framedrop_update(struct vfe_device *vfe_dev, void *arg);
void msm_isp_axi_stream_update(struct vfe_device *vfe_dev,
enum msm_vfe_input_src frame_src);
diff --git a/drivers/media/platform/msm/ais/isp/msm_isp_util.c b/drivers/media/platform/msm/ais/isp/msm_isp_util.c
index 64a3c7cde26b..a9b6e5e6a861 100644
--- a/drivers/media/platform/msm/ais/isp/msm_isp_util.c
+++ b/drivers/media/platform/msm/ais/isp/msm_isp_util.c
@@ -1073,6 +1073,11 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd,
rc = msm_isp_camif_cfg(vfe_dev, arg);
mutex_unlock(&vfe_dev->core_mutex);
break;
+ case VIDIOC_MSM_ISP_FRAMEDROP_UPDATE:
+ mutex_lock(&vfe_dev->core_mutex);
+ msm_isp_framedrop_update(vfe_dev, arg);
+ mutex_unlock(&vfe_dev->core_mutex);
+ break;
case MSM_SD_NOTIFY_FREEZE:
vfe_dev->isp_sof_debug = 0;
vfe_dev->isp_raw0_debug = 0;
diff --git a/include/uapi/media/ais/msm_ais_isp.h b/include/uapi/media/ais/msm_ais_isp.h
index 2b4f0bfeb8c2..649173dd4404 100644
--- a/include/uapi/media/ais/msm_ais_isp.h
+++ b/include/uapi/media/ais/msm_ais_isp.h
@@ -936,6 +936,13 @@ struct msm_vfe_axi_output_plane_cfg {
uint32_t frame_increment;
};
+struct msm_vfe_axi_framedrop_update {
+ enum msm_vfe_axi_stream_src stream_src;
+
+ uint8_t framedrop_period;
+ uint32_t framedrop_pattern;
+};
+
struct msm_vfe_axi_output_path_cfg {
uint8_t enable;
@@ -1003,6 +1010,7 @@ enum msm_isp_ioctl_cmd_code {
MSM_ISP_SET_CLK_STATUS,
MSM_ISP_CMD_EXT,
+ MSM_ISP_FRAMEDROP_UPDATE,
};
@@ -1130,6 +1138,10 @@ enum msm_isp_ioctl_cmd_code {
_IOWR('V', MSM_ISP_AXI_OUTPUT_CFG, \
struct msm_vfe_axi_output_cfg)
+#define VIDIOC_MSM_ISP_FRAMEDROP_UPDATE \
+ _IOWR('V', MSM_ISP_FRAMEDROP_UPDATE, \
+ struct msm_vfe_axi_output_cfg)
+
#define VIDIOC_MSM_ISP_CAMIF_CFG \
_IOWR('V', MSM_ISP_CAMIF_CFG, \
struct msm_vfe_camif_cfg)