OSDN Git Service

Merge "msm: camera: cpp: Issue CPP HALT on page fault"
[sagit-ice-cold/kernel_xiaomi_msm8998.git] / drivers / media / platform / msm / camera_v2 / isp / msm_isp_util.c
index c86ec76..f19e6dd 100644 (file)
@@ -2225,8 +2225,6 @@ static void msm_vfe_iommu_fault_handler(struct iommu_domain *domain,
 
                mutex_lock(&vfe_dev->core_mutex);
                if (vfe_dev->vfe_open_cnt > 0) {
-                       atomic_set(&vfe_dev->error_info.overflow_state,
-                               HALT_ENFORCED);
                        pr_err_ratelimited("%s: fault address is %lx\n",
                                __func__, iova);
                        msm_isp_process_iommu_page_fault(vfe_dev);
@@ -2316,7 +2314,7 @@ int msm_isp_open_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
        /* Register page fault handler */
        vfe_dev->buf_mgr->pagefault_debug_disable = 0;
        /* initialize pd_buf_idx with an invalid index 0xF */
-       vfe_dev->pd_buf_idx = 0xF;
+       vfe_dev->common_data->pd_buf_idx = 0xF;
 
        cam_smmu_reg_client_page_fault_handler(
                        vfe_dev->buf_mgr->iommu_hdl,
@@ -2344,6 +2342,7 @@ int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
 {
        long rc = 0;
        int wm;
+       int i;
        struct vfe_device *vfe_dev = v4l2_get_subdevdata(sd);
        ISP_DBG("%s E open_cnt %u\n", __func__, vfe_dev->vfe_open_cnt);
        mutex_lock(&vfe_dev->realtime_mutex);
@@ -2393,6 +2392,8 @@ int msm_isp_close_node(struct v4l2_subdev *sd, struct v4l2_subdev_fh *fh)
                msm_isp_end_avtimer();
                vfe_dev->vt_enable = 0;
        }
+       for (i = 0; i < VFE_SRC_MAX; i++)
+               vfe_dev->axi_data.src_info[i].lpm = 0;
        MSM_ISP_DUAL_VFE_MUTEX_UNLOCK(vfe_dev);
        vfe_dev->is_split = 0;