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

Commit 2caa5e6d authored by Peter Liu's avatar Peter Liu
Browse files

msm: camera: isp: do not reset axi hw if page fault happened



When Page fault happened, ISP stop write master and
issue stop camera signal.
The reset HW will lead to the bus bridge becomes
active again.

Change-Id: Ic3f140762e47b83c8cf2b6de731a0fa492aa7a84
Signed-off-by: default avatarPeter Liu <pingchie@codeaurora.org>
parent 8b477bbf
Loading
Loading
Loading
Loading
+0 −7
Original line number Diff line number Diff line
@@ -2046,13 +2046,6 @@ int msm_isp_axi_restart(struct vfe_device *vfe_dev,
	unsigned long flags;

	vfe_dev->buf_mgr->frameId_mismatch_recovery = 0;
	if (atomic_read(&vfe_dev->error_info.overflow_state)
		== HALT_ENFORCED) {
		pr_err_ratelimited("%s: no restart, halt enforced.\n",
			__func__);
		return rc;
	}

	for (i = 0, j = 0; j < axi_data->num_active_stream &&
		i < VFE_AXI_SRC_MAX; i++, j++) {
		stream_info = &axi_data->stream_info[i];
+26 −5
Original line number Diff line number Diff line
@@ -993,14 +993,26 @@ static long msm_isp_ioctl_unlocked(struct v4l2_subdev *sd,
		break;
	case VIDIOC_MSM_ISP_AXI_RESET:
		mutex_lock(&vfe_dev->core_mutex);
		if (atomic_read(&vfe_dev->error_info.overflow_state)
			!= HALT_ENFORCED) {
			rc = msm_isp_stats_reset(vfe_dev);
			rc |= msm_isp_axi_reset(vfe_dev, arg);
		} else {
			pr_err_ratelimited("%s: no HW reset, halt enforced.\n",
				__func__);
		}
		mutex_unlock(&vfe_dev->core_mutex);
		break;
	case VIDIOC_MSM_ISP_AXI_RESTART:
		mutex_lock(&vfe_dev->core_mutex);
		if (atomic_read(&vfe_dev->error_info.overflow_state)
			!= HALT_ENFORCED) {
			rc = msm_isp_stats_restart(vfe_dev);
			rc |= msm_isp_axi_restart(vfe_dev, arg);
		} else {
			pr_err_ratelimited("%s: no AXI restart, halt enforced.\n",
				__func__);
		}
		mutex_unlock(&vfe_dev->core_mutex);
		break;
	case VIDIOC_MSM_ISP_INPUT_CFG:
@@ -2062,7 +2074,16 @@ static int msm_vfe_iommu_fault_handler(struct iommu_domain *domain,
			goto end;
		}

		mutex_lock(&vfe_dev->core_mutex);
		if (vfe_dev->vfe_open_cnt > 0) {
			atomic_set(&vfe_dev->error_info.overflow_state,
				HALT_ENFORCED);
			msm_isp_enqueue_tasklet_cmd(vfe_dev, 0, 0, 1);
		} else {
			pr_err("%s: no handling, vfe open cnt = %d\n",
				__func__, vfe_dev->vfe_open_cnt);
		}
		mutex_unlock(&vfe_dev->core_mutex);
	} else {
		ISP_DBG("%s:%d] no token received: %p\n",
			__func__, __LINE__, token);