Commit 27b778c5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

media: atomisp: add debug functions for received events



For debugging purposes, it helps to know what event
was actually received.

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent d61ba1a2
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -4523,6 +4523,7 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,
		atomisp_css_temp_pipe_to_pipe_id(asd, &current_event);
		switch (current_event.event.type) {
		case IA_CSS_EVENT_TYPE_OUTPUT_FRAME_DONE:
			dev_dbg(isp->dev, "event: Output frame done");
			frame_done_found[asd->index] = true;
			atomisp_buf_done(asd, 0, IA_CSS_BUFFER_TYPE_OUTPUT_FRAME,
					 current_event.pipe, true, stream_id);
@@ -4532,6 +4533,7 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,

			break;
		case IA_CSS_EVENT_TYPE_SECOND_OUTPUT_FRAME_DONE:
			dev_dbg(isp->dev, "event: Second output frame done");
			frame_done_found[asd->index] = true;
			atomisp_buf_done(asd, 0, IA_CSS_BUFFER_TYPE_SEC_OUTPUT_FRAME,
					 current_event.pipe, true, stream_id);
@@ -4541,18 +4543,21 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,

			break;
		case IA_CSS_EVENT_TYPE_3A_STATISTICS_DONE:
			dev_dbg(isp->dev, "event: 3A stats frame done");
			atomisp_buf_done(asd, 0,
					 IA_CSS_BUFFER_TYPE_3A_STATISTICS,
					 current_event.pipe,
					 false, stream_id);
			break;
		case IA_CSS_EVENT_TYPE_METADATA_DONE:
			dev_dbg(isp->dev, "event: metadata frame done");
			atomisp_buf_done(asd, 0,
					 IA_CSS_BUFFER_TYPE_METADATA,
					 current_event.pipe,
					 false, stream_id);
			break;
		case IA_CSS_EVENT_TYPE_VF_OUTPUT_FRAME_DONE:
			dev_dbg(isp->dev, "event: VF output frame done");
			atomisp_buf_done(asd, 0,
					 IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME,
					 current_event.pipe, true, stream_id);
@@ -4562,6 +4567,7 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,

			break;
		case IA_CSS_EVENT_TYPE_SECOND_VF_OUTPUT_FRAME_DONE:
			dev_dbg(isp->dev, "event: second VF output frame done");
			atomisp_buf_done(asd, 0,
					 IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME,
					 current_event.pipe, true, stream_id);
@@ -4570,15 +4576,18 @@ int atomisp_css_isr_thread(struct atomisp_device *isp,

			break;
		case IA_CSS_EVENT_TYPE_DIS_STATISTICS_DONE:
			dev_dbg(isp->dev, "event: dis stats frame done");
			atomisp_buf_done(asd, 0,
					 IA_CSS_BUFFER_TYPE_DIS_STATISTICS,
					 current_event.pipe,
					 false, stream_id);
			break;
		case IA_CSS_EVENT_TYPE_PIPELINE_DONE:
			dev_dbg(isp->dev, "event: pipeline done");
			css_pipe_done[asd->index] = true;
			break;
		case IA_CSS_EVENT_TYPE_ACC_STAGE_COMPLETE:
			dev_dbg(isp->dev, "event: acc stage done");
			atomisp_acc_done(asd, current_event.event.fw_handle);
			break;
		default: