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

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

Merge "msm:camera: Restart FE in overflow recovery"

parents 2dafdf26 be74f361
Loading
Loading
Loading
Loading
+20 −0
Original line number Diff line number Diff line
@@ -365,6 +365,20 @@ static int msm_isp_update_fe_frame_id(struct vfe_device *vfe_dev,
	return rc;
}

static int msm_isp_restart_fe(struct vfe_device *vfe_dev,
	void *arg)
{
	struct msm_vfe_restart_fe_cmd *rst_fe = arg;
	int rc = 0;
	/*
	* In case of overflow recovery
	* restart fetch engine
	*/
	if (rst_fe->restart_fe)
		vfe_dev->fetch_engine_info.is_busy = 1;
	return rc;
}

static int msm_isp_start_fetch_engine(struct vfe_device *vfe_dev,
	void *arg)
{
@@ -945,6 +959,12 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd,
		mutex_unlock(&vfe_dev->core_mutex);
		break;

	case VIDIOC_MSM_ISP_RESTART_FE:
		mutex_lock(&vfe_dev->core_mutex);
		rc = msm_isp_restart_fe(vfe_dev, arg);
		mutex_unlock(&vfe_dev->core_mutex);
		break;

	case VIDIOC_MSM_ISP_UPDATE_FE_FRAME_ID:
		mutex_lock(&vfe_dev->core_mutex);
		rc = msm_isp_update_fe_frame_id(vfe_dev, arg);
+9 −0
Original line number Diff line number Diff line
@@ -410,6 +410,10 @@ struct msm_vfe_axi_restart_cmd {
	uint32_t enable_camif;
};

struct msm_vfe_restart_fe_cmd {
	uint32_t restart_fe;
};

struct msm_vfe_axi_stream_update_cmd {
	uint32_t num_streams;
	enum msm_vfe_axi_stream_update_type update_type;
@@ -896,6 +900,7 @@ enum msm_isp_ioctl_cmd_code {
	MSM_ISP_CFG_HW_STATE,
	MSM_ISP_AHB_CLK_CFG,
	MSM_ISP_UPDATE_FE_FRAME_ID,
	MSM_ISP_RESTART_FE,
};

#define VIDIOC_MSM_VFE_REG_CFG \
@@ -978,6 +983,10 @@ enum msm_isp_ioctl_cmd_code {
	_IOWR('V', MSM_ISP_AXI_RESTART, \
		struct msm_vfe_axi_restart_cmd)

#define VIDIOC_MSM_ISP_RESTART_FE \
	_IOWR('V', MSM_ISP_RESTART_FE,\
		struct msm_vfe_restart_fe_cmd)

#define VIDIOC_MSM_ISP_FETCH_ENG_START \
	_IOWR('V', MSM_ISP_FETCH_ENG_START, \
		struct msm_vfe_fetch_eng_start)