]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
media: atomisp: add debug functions for received events
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Wed, 27 May 2020 12:19:27 +0000 (14:19 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 11 Jun 2020 16:13:53 +0000 (18:13 +0200)
For debugging purposes, it helps to know what event
was actually received.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/staging/media/atomisp/pci/atomisp_compat_css20.c

index 6594f62a597e8734cda19b3050b149c4874478e0..2164dd0d49c024c7d3a7b11978c1d58e582dd9f9 100644 (file)
@@ -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: