Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cd77641c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "ais: support frame drop configuration for auto"

parents d146f75a ab4b2398
Loading
Loading
Loading
Loading
+28 −1
Original line number Diff line number Diff line
@@ -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)
{
+1 −0
Original line number Diff line number Diff line
@@ -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);
+5 −0
Original line number Diff line number Diff line
@@ -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;
+12 −0
Original line number Diff line number Diff line
@@ -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)