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

Commit 7a765d39 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: isp: Define separate error events"

parents bb29ea15 3fe62120
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -732,7 +732,8 @@ void msm_isp_increment_frame_id(struct vfe_device *vfe_dev,
					src_info->frame_id -
					src_info->reg_update_frame_id);

				msm_isp_halt_send_error(vfe_dev);
				msm_isp_halt_send_error(vfe_dev,
					ISP_EVENT_REG_UPDATE_MISSING);
			}

		} else
@@ -1414,7 +1415,7 @@ static int msm_isp_get_done_buf(struct vfe_device *vfe_dev,
	return rc;
}

void msm_isp_halt_send_error(struct vfe_device *vfe_dev)
void msm_isp_halt_send_error(struct vfe_device *vfe_dev, uint32_t event)
{
	uint32_t i = 0;
	struct msm_isp_event_data error_event;
@@ -1441,7 +1442,7 @@ void msm_isp_halt_send_error(struct vfe_device *vfe_dev)
	error_event.frame_id =
		vfe_dev->axi_data.src_info[VFE_PIX_0].frame_id;

	msm_isp_send_event(vfe_dev, ISP_EVENT_IOMMU_P_FAULT, &error_event);
	msm_isp_send_event(vfe_dev, event, &error_event);
}

int msm_isp_print_ping_pong_address(struct vfe_device *vfe_dev,
@@ -1838,10 +1839,8 @@ int msm_isp_drop_frame(struct vfe_device *vfe_dev,
	rc = msm_isp_get_done_buf(vfe_dev, stream_info,
		pingpong_status, &done_buf);
	if (rc < 0) {
		pr_err("%s: VFE%d get buf error\n",
			__func__, vfe_dev->pdev->id);
		spin_unlock_irqrestore(&stream_info->lock, flags);
		msm_isp_halt_send_error(vfe_dev);
		msm_isp_halt_send_error(vfe_dev, ISP_EVENT_PING_PONG_MISMATCH);
		return rc;
	}

@@ -3208,7 +3207,7 @@ void msm_isp_process_axi_irq_stream(struct vfe_device *vfe_dev,
		pr_err_ratelimited("%s:VFE%d get done buf fail\n",
			__func__, vfe_dev->pdev->id);
		spin_unlock_irqrestore(&stream_info->lock, flags);
		msm_isp_halt_send_error(vfe_dev);
		msm_isp_halt_send_error(vfe_dev, ISP_EVENT_PING_PONG_MISMATCH);
		return;
	}
	if (vfe_dev->buf_mgr->frameId_mismatch_recovery == 1) {
+1 −1
Original line number Diff line number Diff line
@@ -86,7 +86,7 @@ int msm_isp_drop_frame(struct vfe_device *vfe_dev,
	struct msm_vfe_axi_stream *stream_info, struct msm_isp_timestamp *ts,
	struct msm_isp_sof_info *sof_info);

void msm_isp_halt_send_error(struct vfe_device *vfe_dev);
void msm_isp_halt_send_error(struct vfe_device *vfe_dev, uint32_t event);

static inline void msm_isp_cfg_wm_scratch(struct vfe_device *vfe_dev,
				int wm,
+1 −1
Original line number Diff line number Diff line
@@ -1806,7 +1806,7 @@ void ms_isp_process_iommu_page_fault(struct vfe_device *vfe_dev)
	pr_err("%s:%d] VFE%d Handle Page fault! vfe_dev %p\n", __func__,
		__LINE__,  vfe_dev->pdev->id, vfe_dev);

	msm_isp_halt_send_error(vfe_dev);
	msm_isp_halt_send_error(vfe_dev, ISP_EVENT_IOMMU_P_FAULT);

	if (vfe_dev->buf_mgr->pagefault_debug_disable == 0) {
		vfe_dev->buf_mgr->pagefault_debug_disable = 1;
+5 −1
Original line number Diff line number Diff line
@@ -604,7 +604,9 @@ enum msm_isp_event_idx {
	ISP_IOMMU_P_FAULT     = 9,
	ISP_ERROR             = 10,
	ISP_HW_FATAL_ERROR      = 11,
	ISP_EVENT_MAX         = 12
	ISP_PING_PONG_MISMATCH = 12,
	ISP_REG_UPDATE_MISSING = 13,
	ISP_EVENT_MAX         = 14
};

#define ISP_EVENT_OFFSET          8
@@ -630,6 +632,8 @@ enum msm_isp_event_idx {
#define ISP_EVENT_FE_READ_DONE    (ISP_EVENT_BASE + ISP_FE_RD_DONE)
#define ISP_EVENT_IOMMU_P_FAULT   (ISP_EVENT_BASE + ISP_IOMMU_P_FAULT)
#define ISP_EVENT_HW_FATAL_ERROR  (ISP_EVENT_BASE + ISP_HW_FATAL_ERROR)
#define ISP_EVENT_PING_PONG_MISMATCH (ISP_EVENT_BASE + ISP_PING_PONG_MISMATCH)
#define ISP_EVENT_REG_UPDATE_MISSING (ISP_EVENT_BASE + ISP_REG_UPDATE_MISSING)
#define ISP_EVENT_STREAM_UPDATE_DONE   (ISP_STREAM_EVENT_BASE)

/* The msm_v4l2_event_data structure should match the