Dear NXP Team,
I enabled a camera(Onsemi AP1302 + AR0144) on imx8MM, but it cannot preview when I want to preview specific resolutions.
The camera supports two resolutions, 1280x720(720p) and 1280x800(sensor full size).
However, I tried to enable the camera but it couldn't be enabled before I modified the mipi-csi clock-frequency & camera MIPI setting.
Finally, I success to enable the camera with 720p, but full size still can't be enabled.
I don't know why full size can't, I really wonder that.
My current setting is camera MIPI speed is 400M, mipi-csi clock-frequency is 400M.
fragment@1 {
target = <&mipi_csi_1>;
__overlay__ {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <400000000>;
port {
mipi1_sensor_ep: endpoint@1 {
remote-endpoint = <&tevi_ap1302_1_ep>;
data-lanes = <4>;
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
};
};
};
};
I don't know how to understand mipi-csi setting about "csis-hs-settle" & "csi-clk-settle", and I don't understand how to set the mipi-csi clock-frequency is better. I cannot find any document to describe them and I only found it but there is still no detail about these settings.
Explenation for HS-SETTLE parameter in MIPI CSI D-PHY registers
How do I decide these settings to enable the camera?
Hi @joanxie:
Do you have any updates about this issue?
I tried to read CSI_CR19 (0x32E2_004C) but I didn't find the value was overflow (over 255?).
I tried it like below that:
root@edm-g-imx8mm:~# /unit_tests/memtool -32 32E2004C 1
E
Reading 0x1 count starting at address 0x32E2004C
0x32E2004C: 00000000
root@edm-g-imx8mm:~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false --no-posi
tion &
[1] 695
root@edm-g-imx8mm:~# Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
root@edm-g-imx8mm:~# /unit_tests/memtool -32 32E2004C 1
E
Reading 0x1 count starting at address 0x32E2004C
0x32E2004C: 00000010
root@edm-g-imx8mm:~# kill -INT 695
handling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:30.588496172
Setting pipeline to NULL ...
Total showed frames (914), playing for (0:00:30.588386298), fps (29.881).
Freeing pipeline ...
[1]+ Done gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false --no-position
root@edm-g-imx8mm:~# /unit_tests/memtool -32 32E2004C 1
E
Reading 0x1 count starting at address 0x32E2004C
0x32E2004C: 00000034
However, there is still FIFO overflow Error in mipi_csis_irq_handler when I open 1280x800 again.
If I open 1280x720, it never triggers mipi_csis_irq_handler and it always can work.
I don't know why the different resolutions have different situations.
Do you have any ideas?
Updated 2022.03.31:
I found it doesn't trigger mipi_csis_irq_handler but mx6s_csi_irq_handler if I enable 1280x720. But If I enable 1280x800, it firstly triggers mx6s_csi_irq_handler, then it triggers mipi_csis_irq_handler and gets FIFO overflow Error. \
I trace that below:
1. 1280x720 (always work
root@edm-g-imx8mm:/sys/kernel/debug/tracing# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720 ! imxvideoconvert_g2d ! fpsdisplays
ink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:02.707396750
Setting pipeline to NULL ...
Total showed frames (77), playing for (0:00:02.707361000), fps (28.441).
Freeing pipeline ...
root@edm-g-imx8mm:/sys/kernel/debug/tracing# cat trace | less
# tracer: function
#
# entries-in-buffer/entries-written: 648/648 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
gst-launch-1.0-705 [003] .... 252.049921: v4l2_open <-chrdev_open
gst-launch-1.0-705 [003] .... 252.049927: mx6s_csi_open <-v4l2_open
gst-launch-1.0-705 [003] .... 252.049943: mx6s_csi_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-705 [003] .... 252.049951: mipi_csis_s_power <-mx6s_csi_open
gst-launch-1.0-705 [003] .... 252.049956: mipi_csis_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-705 [003] .... 252.049956: mipi_csis_pm_resume <-mipi_csis_runtime_resume
gst-launch-1.0-705 [003] .... 252.049962: mipi_csis_clk_enable <-mipi_csis_pm_resume
gst-launch-1.0-705 [003] .... 252.049976: csi_clk_enable <-mx6s_csi_open
gst-launch-1.0-705 [003] .... 252.049981: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_open
gst-launch-1.0-705 [003] .... 252.049990: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.050031: v4l2_release <-__fput
gst-launch-1.0-705 [003] .... 252.050032: mx6s_csi_close <-v4l2_release
gst-launch-1.0-705 [003] .... 252.050036: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_close
gst-launch-1.0-705 [003] .... 252.050038: csi_clk_disable <-mx6s_csi_close
gst-launch-1.0-705 [003] .... 252.050043: mipi_csis_s_power <-mx6s_csi_close
gst-launch-1.0-705 [003] .... 252.050047: mipi_csis_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-705 [003] .... 252.050048: mipi_csis_pm_suspend <-mipi_csis_runtime_suspend
gst-launch-1.0-705 [003] .... 252.050049: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-705 [003] .... 252.050050: mipi_csis_system_enable.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-705 [003] .... 252.050053: mipi_csis_clk_disable <-mipi_csis_pm_suspend
gst-launch-1.0-705 [003] .... 252.050064: mx6s_csi_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-705 [003] .... 252.171600: v4l2_open <-chrdev_open
gst-launch-1.0-705 [003] .... 252.171605: mx6s_csi_open <-v4l2_open
gst-launch-1.0-705 [003] .... 252.171624: mx6s_csi_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-705 [003] .... 252.171631: mipi_csis_s_power <-mx6s_csi_open
gst-launch-1.0-705 [003] .... 252.171636: mipi_csis_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-705 [003] .... 252.171636: mipi_csis_pm_resume <-mipi_csis_runtime_resume
gst-launch-1.0-705 [003] .... 252.171642: mipi_csis_clk_enable <-mipi_csis_pm_resume
gst-launch-1.0-705 [003] .... 252.171654: csi_clk_enable <-mx6s_csi_open
gst-launch-1.0-705 [003] .... 252.171659: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_open
gst-launch-1.0-705 [003] .... 252.171667: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171816: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171875: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171879: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171882: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171885: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171888: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171890: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171892: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171895: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171901: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 252.171905: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172836: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172848: mipi_csis_enum_mbus_code <-call_enum_mbus_code
v4l2src0:src-708 [001] .... 252.172858: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172860: mipi_csis_enum_mbus_code <-call_enum_mbus_code
v4l2src0:src-708 [001] .... 252.172867: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172889: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172892: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-708 [001] .... 252.172896: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172898: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-708 [001] .... 252.172905: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172906: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-708 [001] .... 252.172924: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172925: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-708 [001] .... 252.172928: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172929: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-708 [001] .... 252.172932: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172933: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-708 [001] .... 252.172950: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.172951: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-708 [001] .... 252.173691: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.173706: mipi_csis_set_fmt <-call_set_fmt
v4l2src0:src-708 [001] .... 252.183367: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183385: mipi_csis_set_fmt <-call_set_fmt
v4l2src0:src-708 [001] .... 252.183390: csi_deinterlace_enable.isra.0 <-mx6s_vidioc_s_fmt_vid_cap
v4l2src0:src-708 [001] .... 252.183412: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183415: mipi_csis_g_parm <-mx6s_vidioc_g_parm
v4l2src0:src-708 [001] .... 252.183423: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183428: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183668: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183677: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183681: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183684: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183686: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.183973: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.184113: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192659: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192677: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192681: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192726: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192814: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192830: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192850: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192855: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192886: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 252.192916: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [000] .... 252.203796: csi_dmareq_rff_enable.isra.0 <-mx6s_start_streaming
v4l2src0:src-708 [000] .... 252.203802: csi_enable_int.isra.0.constprop.0 <-mx6s_start_streaming
v4l2src0:src-708 [000] .... 252.203803: csi_enable.isra.0 <-mx6s_start_streaming
v4l2src0:src-708 [000] .... 252.203806: mipi_csis_s_stream <-mx6s_vidioc_streamon
v4l2src0:src-708 [000] .... 252.203812: mipi_csis_start_stream <-mipi_csis_s_stream
v4l2src0:src-708 [000] .... 252.203828: mipi_csis_system_enable.isra.0 <-mipi_csis_start_stream
v4l2src0:src-708 [000] .... 252.203830: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_start_stream
v4l2src0:src-708 [000] .... 252.250454: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 252.269097: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 252.302427: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 252.316813: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 252.316814: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-708 [000] .... 252.316844: v4l2_poll <-do_sys_poll
v4l2src0:src-708 [000] .... 252.316856: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [000] .... 252.322155: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [000] .... 252.334966: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.H1 252.335763: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 252.350146: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 252.350148: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-708 [000] .... 252.350170: v4l2_poll <-do_sys_poll
v4l2src0:src-708 [000] .... 252.350189: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [000] .... 252.353110: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [000] .... 252.354152: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 252.369098: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 252.383479: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 252.383481: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-708 [000] .... 252.383501: v4l2_poll <-do_sys_poll
v4l2src0:src-708 [000] .... 252.383515: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [000] .... 252.386408: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [000] .... 252.387464: v4l2_poll <-do_sys_poll
... (ignore)
<idle>-0 [000] d.h1 254.802446: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 254.816831: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 254.816835: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-708 [001] .... 254.816857: v4l2_poll <-do_sys_poll
v4l2src0:src-708 [001] .... 254.816872: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 254.819163: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 254.828870: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 254.835781: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 254.850164: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 254.850167: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-708 [001] .... 254.850188: v4l2_poll <-do_sys_poll
v4l2src0:src-708 [001] .... 254.850201: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 254.852504: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-708 [001] .... 254.862387: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 254.869117: mx6s_csi_irq_handler <-__handle_irq_event_percpu
v4l2src0:src-708 [001] .... 254.881791: v4l2_poll <-do_sys_poll
gst-launch-1.0-705 [003] .... 254.881893: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 254.881901: csi_dmareq_rff_disable.isra.0 <-mx6s_stop_streaming
gst-launch-1.0-705 [003] .... 254.881903: csi_enable.isra.0 <-mx6s_stop_streaming
gst-launch-1.0-705 [003] .... 254.882110: mipi_csis_s_stream <-mx6s_vidioc_streamoff
gst-launch-1.0-705 [003] .... 254.931767: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_s_stream
gst-launch-1.0-705 [003] .... 254.931771: mipi_csis_system_enable.isra.0 <-mipi_csis_s_stream
gst-launch-1.0-705 [003] .... 254.931898: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-705 [003] .... 254.934614: v4l2_release <-__fput
gst-launch-1.0-705 [003] .... 254.934619: mx6s_csi_close <-v4l2_release
gst-launch-1.0-705 [003] .... 254.934623: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_close
gst-launch-1.0-705 [003] .... 254.934625: csi_clk_disable <-mx6s_csi_close
gst-launch-1.0-705 [003] .... 254.934636: mipi_csis_s_power <-mx6s_csi_close
gst-launch-1.0-705 [003] .... 254.934648: mipi_csis_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-705 [003] .... 254.934648: mipi_csis_pm_suspend <-mipi_csis_runtime_suspend
gst-launch-1.0-705 [003] .... 254.934650: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-705 [003] .... 254.934651: mipi_csis_system_enable.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-705 [003] .... 254.934658: mipi_csis_clk_disable <-mipi_csis_pm_suspend
gst-launch-1.0-705 [003] .... 254.934675: mx6s_csi_runtime_suspend <-pm_generic_runtime_suspend
2. Trace 1280x800 (first enable and it can work after boot, but it show FIFO overflow error after closing camera):
root@edm-g-imx8mm:/sys/kernel/debug/tracing# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:02.532604750
Setting pipeline to NULL ...
[ 150.791575] FIFO Overflow Error: 1
[ 150.794988] Frame Start: 1
[ 150.797694] Frame End: 1
[ 150.800225] status: 01100010
Total showed frames (72), playing for (0:00:02.532564875), fps (28.430).
Freeing pipeline ...
root@edm-g-imx8mm:/sys/kernel/debug/tracing# cat trace | less
# tracer: function
#
# entries-in-buffer/entries-written: 618/618 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
gst-launch-1.0-700 [003] .... 148.082058: v4l2_open <-chrdev_open
gst-launch-1.0-700 [003] .... 148.082063: mx6s_csi_open <-v4l2_open
gst-launch-1.0-700 [003] .... 148.082078: mx6s_csi_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-700 [003] .... 148.082086: mipi_csis_s_power <-mx6s_csi_open
gst-launch-1.0-700 [003] .... 148.082090: mipi_csis_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-700 [003] .... 148.082091: mipi_csis_pm_resume <-mipi_csis_runtime_resume
gst-launch-1.0-700 [003] .... 148.082097: mipi_csis_clk_enable <-mipi_csis_pm_resume
gst-launch-1.0-700 [003] .... 148.082111: csi_clk_enable <-mx6s_csi_open
gst-launch-1.0-700 [003] .... 148.082116: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_open
gst-launch-1.0-700 [003] .... 148.082125: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.082167: v4l2_release <-__fput
gst-launch-1.0-700 [003] .... 148.082169: mx6s_csi_close <-v4l2_release
gst-launch-1.0-700 [003] .... 148.082172: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_close
gst-launch-1.0-700 [003] .... 148.082174: csi_clk_disable <-mx6s_csi_close
gst-launch-1.0-700 [003] .... 148.082179: mipi_csis_s_power <-mx6s_csi_close
gst-launch-1.0-700 [003] .... 148.082184: mipi_csis_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-700 [003] .... 148.082185: mipi_csis_pm_suspend <-mipi_csis_runtime_suspend
gst-launch-1.0-700 [003] .... 148.082186: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-700 [003] .... 148.082187: mipi_csis_system_enable.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-700 [003] .... 148.082190: mipi_csis_clk_disable <-mipi_csis_pm_suspend
gst-launch-1.0-700 [003] .... 148.082201: mx6s_csi_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-700 [003] .... 148.203420: v4l2_open <-chrdev_open
gst-launch-1.0-700 [003] .... 148.203425: mx6s_csi_open <-v4l2_open
gst-launch-1.0-700 [003] .... 148.203444: mx6s_csi_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-700 [003] .... 148.203450: mipi_csis_s_power <-mx6s_csi_open
gst-launch-1.0-700 [003] .... 148.203454: mipi_csis_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-700 [003] .... 148.203455: mipi_csis_pm_resume <-mipi_csis_runtime_resume
gst-launch-1.0-700 [003] .... 148.203461: mipi_csis_clk_enable <-mipi_csis_pm_resume
gst-launch-1.0-700 [003] .... 148.203473: csi_clk_enable <-mx6s_csi_open
gst-launch-1.0-700 [003] .... 148.203478: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_open
gst-launch-1.0-700 [003] .... 148.203485: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203574: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203630: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203634: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203637: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203639: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203642: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203644: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203647: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203649: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203655: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 148.203659: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204626: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204639: mipi_csis_enum_mbus_code <-call_enum_mbus_code
v4l2src0:src-703 [002] .... 148.204648: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204649: mipi_csis_enum_mbus_code <-call_enum_mbus_code
v4l2src0:src-703 [002] .... 148.204657: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204679: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204682: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-703 [002] .... 148.204686: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204688: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-703 [002] .... 148.204695: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204696: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-703 [002] .... 148.204713: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204714: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-703 [002] .... 148.204717: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204718: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-703 [002] .... 148.204721: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204722: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-703 [002] .... 148.204740: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.204742: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-703 [002] .... 148.205450: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.205465: mipi_csis_set_fmt <-call_set_fmt
v4l2src0:src-703 [002] .... 148.215211: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215229: mipi_csis_set_fmt <-call_set_fmt
v4l2src0:src-703 [002] .... 148.215234: csi_deinterlace_enable.isra.0 <-mx6s_vidioc_s_fmt_vid_cap
v4l2src0:src-703 [002] .... 148.215256: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215260: mipi_csis_g_parm <-mx6s_vidioc_g_parm
v4l2src0:src-703 [002] .... 148.215269: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215274: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215523: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215532: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215535: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215538: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215541: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215793: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.215933: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224608: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224626: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224630: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224676: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224765: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224779: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224801: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224806: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224835: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.224864: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 148.235766: csi_dmareq_rff_enable.isra.0 <-mx6s_start_streaming
v4l2src0:src-703 [002] .... 148.235771: csi_enable_int.isra.0.constprop.0 <-mx6s_start_streaming
v4l2src0:src-703 [002] .... 148.235772: csi_enable.isra.0 <-mx6s_start_streaming
v4l2src0:src-703 [002] .... 148.235775: mipi_csis_s_stream <-mx6s_vidioc_streamon
v4l2src0:src-703 [002] .... 148.235779: mipi_csis_start_stream <-mipi_csis_s_stream
v4l2src0:src-703 [002] .... 148.235795: mipi_csis_system_enable.isra.0 <-mipi_csis_start_stream
v4l2src0:src-703 [002] .... 148.235796: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_start_stream
v4l2src0:src-703 [002] .... 148.282454: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 148.301208: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 148.322313: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 148.338307: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 148.338309: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-703 [002] .... 148.338327: v4l2_poll <-do_sys_poll
v4l2src0:src-703 [002] .... 148.338340: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [003] .... 148.343898: v4l2_ioctl <-__arm64_sys_ioctl
<idle>-0 [000] d.h1 148.355650: mx6s_csi_irq_handler <-__handle_irq_event_percpu
v4l2src0:src-703 [000] .... 148.368066: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 148.371642: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 148.371645: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-703 [000] .... 148.371685: v4l2_poll <-do_sys_poll
v4l2src0:src-703 [000] .... 148.371695: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [000] .... 148.374845: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [000] .... 148.375973: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 148.388988: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 148.404975: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 148.404977: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-703 [000] .... 148.405000: v4l2_poll <-do_sys_poll
v4l2src0:src-703 [000] .... 148.405019: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [001] .... 148.408196: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [001] .... 148.409327: v4l2_poll <-do_sys_poll
... (ignore)
<idle>-0 [000] d.h1 150.688995: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 150.704993: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h2 150.704997: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-703 [002] .... 150.705021: v4l2_poll <-do_sys_poll
v4l2src0:src-703 [002] .... 150.705035: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 150.707539: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 150.717560: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 150.722334: mx6s_csi_irq_handler <-__handle_irq_event_percpu
weston-626 [000] d.h. 150.738327: mx6s_csi_irq_handler <-__handle_irq_event_percpu
weston-626 [000] d.h1 150.738331: mx6s_csi_frame_done.constprop.0 <-mx6s_csi_irq_handler
v4l2src0:src-703 [002] .... 150.738355: v4l2_poll <-do_sys_poll
v4l2src0:src-703 [002] .... 150.738372: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-703 [002] .... 150.738839: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 150.738919: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [003] .... 150.738924: csi_dmareq_rff_disable.isra.0 <-mx6s_stop_streaming
gst-launch-1.0-700 [003] .... 150.738926: csi_enable.isra.0 <-mx6s_stop_streaming
gst-launch-1.0-700 [003] .... 150.739141: mipi_csis_s_stream <-mx6s_vidioc_streamoff
<idle>-0 [000] d.h1 150.791556: mipi_csis_irq_handler <-__handle_irq_event_percpu
gst-launch-1.0-700 [001] .... 150.819870: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_s_stream
gst-launch-1.0-700 [001] .... 150.819875: mipi_csis_system_enable.isra.0 <-mipi_csis_s_stream
gst-launch-1.0-700 [001] .... 150.820040: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-700 [001] .... 150.822847: v4l2_release <-__fput
gst-launch-1.0-700 [001] .... 150.822853: mx6s_csi_close <-v4l2_release
gst-launch-1.0-700 [001] .... 150.822858: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_close
gst-launch-1.0-700 [001] .... 150.822860: csi_clk_disable <-mx6s_csi_close
gst-launch-1.0-700 [001] .... 150.822870: mipi_csis_s_power <-mx6s_csi_close
gst-launch-1.0-700 [001] .... 150.822881: mipi_csis_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-700 [001] .... 150.822881: mipi_csis_pm_suspend <-mipi_csis_runtime_suspend
gst-launch-1.0-700 [001] .... 150.822883: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-700 [001] .... 150.822884: mipi_csis_system_enable.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-700 [001] .... 150.822890: mipi_csis_clk_disable <-mipi_csis_pm_suspend
gst-launch-1.0-700 [001] .... 150.822906: mx6s_csi_runtime_suspend <-pm_generic_runtime_suspend
Next enable 1280x800 again (it shows FIFO overflow error and it cannot work
root@edm-g-imx8mm:/sys/kernel/debug/tracing$ echo function > current_tracer
root@edm-g-imx8mm:/sys/kernel/debug/tracing$ gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 475.316849] FIFO Overflow Error: 1
[ 475.320263] Frame Start: 1
[ 475.322969] status: 01000010
[ 475.325877] FIFO Overflow Error: 2
[ 475.329281] status: 00000010
[ 475.334636] FIFO Overflow Error: 3
[ 475.338040] status: 00000010
[ 475.340932] FIFO Overflow Error: 4
[ 475.344332] status: 00000010
[ 475.347229] FIFO Overflow Error: 5
[ 475.350632] status: 00000010
[ 475.367967] FIFO Overflow Error: 6
[ 475.371370] status: 00000010
[ 475.374267] FIFO Overflow Error: 7
[ 475.377668] status: 00000010
[ 475.380567] FIFO Overflow Error: 8
[ 475.383968] status: 00000010
[ 475.401300] FIFO Overflow Error: 9
[ 475.404702] status: 00000010
[ 475.407599] FIFO Overflow Error: 10
[ 475.411088] status: 00000010
[ 475.413996] FIFO Overflow Error: 11
[ 475.417491] status: 00000010
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:0[ 475.434646] FIFO Overflow Error: 12
[ 475.439459] status: 00000010
0.220528500
Setting pipeline to [ 475.442377] FIFO Overflow Error: 13
[ 475.448707] status: 00000010
NULL ...
[ 475.459535] FIFO Overflow Error: 14
[ 475.463028] status: 00000010
[ 475.465938] FIFO Overflow Error: 15
[ 475.469426] status: 00000010
[ 475.472329] FIFO Overflow Error: 16
[ 475.475817] status: 00000010
[ 475.478717] FIFO Overflow Error: 17
[ 475.482205] status: 00000010
Freeing pipeline ...
root@edm-g-imx8mm:/sys/kernel/debug/tracing# cat trace | less
# tracer: function
#
# entries-in-buffer/entries-written: 132/132 #P:4
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _---=> hardirq/softirq
# || / _--=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
gst-launch-1.0-754 [003] .... 475.170379: v4l2_open <-chrdev_open
gst-launch-1.0-754 [003] .... 475.170384: mx6s_csi_open <-v4l2_open
gst-launch-1.0-754 [003] .... 475.170399: mx6s_csi_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-754 [003] .... 475.170406: mipi_csis_s_power <-mx6s_csi_open
gst-launch-1.0-754 [003] .... 475.170410: mipi_csis_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-754 [003] .... 475.170411: mipi_csis_pm_resume <-mipi_csis_runtime_resume
gst-launch-1.0-754 [003] .... 475.170415: mipi_csis_clk_enable <-mipi_csis_pm_resume
gst-launch-1.0-754 [003] .... 475.170427: csi_clk_enable <-mx6s_csi_open
gst-launch-1.0-754 [003] .... 475.170432: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_open
gst-launch-1.0-754 [003] .... 475.170439: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.170472: v4l2_release <-__fput
gst-launch-1.0-754 [003] .... 475.170473: mx6s_csi_close <-v4l2_release
gst-launch-1.0-754 [003] .... 475.170475: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_close
gst-launch-1.0-754 [003] .... 475.170477: csi_clk_disable <-mx6s_csi_close
gst-launch-1.0-754 [003] .... 475.170481: mipi_csis_s_power <-mx6s_csi_close
gst-launch-1.0-754 [003] .... 475.170485: mipi_csis_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-754 [003] .... 475.170485: mipi_csis_pm_suspend <-mipi_csis_runtime_suspend
gst-launch-1.0-754 [003] .... 475.170486: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-754 [003] .... 475.170487: mipi_csis_system_enable.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-754 [003] .... 475.170490: mipi_csis_clk_disable <-mipi_csis_pm_suspend
gst-launch-1.0-754 [003] .... 475.170499: mx6s_csi_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-754 [003] .... 475.206900: v4l2_open <-chrdev_open
gst-launch-1.0-754 [003] .... 475.206905: mx6s_csi_open <-v4l2_open
gst-launch-1.0-754 [003] .... 475.206923: mx6s_csi_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-754 [003] .... 475.206930: mipi_csis_s_power <-mx6s_csi_open
gst-launch-1.0-754 [003] .... 475.206934: mipi_csis_runtime_resume <-pm_generic_runtime_resume
gst-launch-1.0-754 [003] .... 475.206935: mipi_csis_pm_resume <-mipi_csis_runtime_resume
gst-launch-1.0-754 [003] .... 475.206940: mipi_csis_clk_enable <-mipi_csis_pm_resume
gst-launch-1.0-754 [003] .... 475.206952: csi_clk_enable <-mx6s_csi_open
gst-launch-1.0-754 [003] .... 475.206956: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_open
gst-launch-1.0-754 [003] .... 475.206964: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207032: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207085: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207088: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207091: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207093: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207095: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207098: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207100: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207103: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207109: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.207113: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208068: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208082: mipi_csis_enum_mbus_code <-call_enum_mbus_code
v4l2src0:src-757 [000] .... 475.208092: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208093: mipi_csis_enum_mbus_code <-call_enum_mbus_code
v4l2src0:src-757 [000] .... 475.208101: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208120: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208123: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-757 [000] .... 475.208126: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208128: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-757 [000] .... 475.208134: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208135: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-757 [000] .... 475.208150: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208151: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-757 [000] .... 475.208153: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208154: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-757 [000] .... 475.208156: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208157: mipi_csis_enum_frameintervals <-call_enum_frame_interval
v4l2src0:src-757 [000] .... 475.208173: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208174: mipi_csis_enum_framesizes <-call_enum_frame_size
v4l2src0:src-757 [000] .... 475.208793: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.208808: mipi_csis_set_fmt <-call_set_fmt
v4l2src0:src-757 [000] .... 475.217925: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.217943: mipi_csis_set_fmt <-call_set_fmt
v4l2src0:src-757 [000] .... 475.217947: csi_deinterlace_enable.isra.0 <-mx6s_vidioc_s_fmt_vid_cap
v4l2src0:src-757 [000] .... 475.217968: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.217971: mipi_csis_g_parm <-mx6s_vidioc_g_parm
v4l2src0:src-757 [000] .... 475.217979: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.217984: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.218214: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.218223: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.218226: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.218229: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.218231: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.218398: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.218516: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226431: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226451: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226454: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226502: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226598: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226616: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226638: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226643: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226681: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.226711: v4l2_ioctl <-__arm64_sys_ioctl
v4l2src0:src-757 [000] .... 475.239906: csi_dmareq_rff_enable.isra.0 <-mx6s_start_streaming
v4l2src0:src-757 [000] .... 475.239911: csi_enable_int.isra.0.constprop.0 <-mx6s_start_streaming
v4l2src0:src-757 [000] .... 475.239912: csi_enable.isra.0 <-mx6s_start_streaming
v4l2src0:src-757 [000] .... 475.239915: mipi_csis_s_stream <-mx6s_vidioc_streamon
v4l2src0:src-757 [000] .... 475.239918: mipi_csis_start_stream <-mipi_csis_s_stream
v4l2src0:src-757 [000] .... 475.239934: mipi_csis_system_enable.isra.0 <-mipi_csis_start_stream
v4l2src0:src-757 [000] .... 475.239935: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_start_stream
v4l2src0:src-757 [000] .... 475.286500: v4l2_poll <-do_sys_poll
<idle>-0 [000] d.h1 475.306253: mx6s_csi_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.316834: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.325874: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.334628: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.340930: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.H1 475.347226: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.367961: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.374264: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] dNh1 475.380564: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.401295: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.407596: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] dNh1 475.413990: mipi_csis_irq_handler <-__handle_irq_event_percpu
v4l2src0:src-757 [000] .... 475.431278: v4l2_poll <-do_sys_poll
gst-launch-1.0-754 [003] .... 475.431560: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.431569: csi_dmareq_rff_disable.isra.0 <-mx6s_stop_streaming
gst-launch-1.0-754 [003] .... 475.431598: csi_enable.isra.0 <-mx6s_stop_streaming
gst-launch-1.0-754 [003] .... 475.432126: mipi_csis_s_stream <-mx6s_vidioc_streamoff
<idle>-0 [000] d.h1 475.434629: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.442374: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] d.h1 475.459524: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] dNh1 475.465934: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] dNh1 475.472325: mipi_csis_irq_handler <-__handle_irq_event_percpu
<idle>-0 [000] dNh1 475.478714: mipi_csis_irq_handler <-__handle_irq_event_percpu
gst-launch-1.0-754 [003] .... 475.515765: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_s_stream
gst-launch-1.0-754 [003] .... 475.515768: mipi_csis_system_enable.isra.0 <-mipi_csis_s_stream
gst-launch-1.0-754 [003] .... 475.515902: v4l2_ioctl <-__arm64_sys_ioctl
gst-launch-1.0-754 [003] .... 475.518323: v4l2_release <-__fput
gst-launch-1.0-754 [003] .... 475.518328: mx6s_csi_close <-v4l2_release
gst-launch-1.0-754 [003] .... 475.518333: csi_dmareq_rff_disable.isra.0 <-mx6s_csi_close
gst-launch-1.0-754 [003] .... 475.518335: csi_clk_disable <-mx6s_csi_close
gst-launch-1.0-754 [003] .... 475.518344: mipi_csis_s_power <-mx6s_csi_close
gst-launch-1.0-754 [003] .... 475.518354: mipi_csis_runtime_suspend <-pm_generic_runtime_suspend
gst-launch-1.0-754 [003] .... 475.518355: mipi_csis_pm_suspend <-mipi_csis_runtime_suspend
gst-launch-1.0-754 [003] .... 475.518357: mipi_csis_enable_interrupts.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-754 [003] .... 475.518358: mipi_csis_system_enable.isra.0 <-mipi_csis_pm_suspend
gst-launch-1.0-754 [003] .... 475.518364: mipi_csis_clk_disable <-mipi_csis_pm_suspend
gst-launch-1.0-754 [003] .... 475.518381: mx6s_csi_runtime_suspend <-pm_generic_runtime_suspend
I don't know why they are different when I enable the different resolutions.
I think maybe the issue is related to FIFO overflow Error.
I tried to find some discussion about that:
https://community.nxp.com/t5/i-MX-Processors/FIFO-Overflow-error-on-low-resolution/m-p/1154998
But there is no solution for imx8MM but imx8MQ because I cannot find a similar register on imx8MM to CSI_PHY_CTL_REG(0x30A7_0104) on imx8MQ.
And CSI_PHY_CTL_REG just can only disable lanes so I'm not sure that the solution is correct.
How could I understand the cause of FIFO overflow error?
Is there a better solution for imx8MM?
Hi @joanxie ,
I tried to use mx6s_v4l2_cap_drm.out, but got an error.
root@edm-g-imx8mm:~# /unit_tests/V4L2/mx6s_v4l2_cap_drm.out -t 1000
---- Running < /unit_tests/V4L2/mx6s_v4l2_cap_drm.out > test ----
Found v4l2 capture device /dev/video0.
VIDIOC_S_PARM failed
Then I got the device list:
root@edm-g-imx8mm:~# /unit_tests/V4L2/mx6s_v4l2_cap_drm.out -l
---- Running < /unit_tests/V4L2/mx6s_v4l2_cap_drm.out > test ----
open video device /dev/video0
Found v4l2 capture device /dev/video0
pixelformat (output by camera): UYVY
CaptureMode=0, Width=1280, Height=720 30.000 fps
CaptureMode=1, Width=1280, Height=800 30.000 fps
$ /unit_tests/V4L2/mx6s_v4l2_cap_drm.out -d /dev/video0 -fr 30 -m 4 -ow 1280 -oh 800 -of test.raw
try this command, you can change the parameter as your demands, you can use ./mx6s_cap_drm.out -help to get more detailed information
Hi @joanxie
Yes, I tried again but it still returned the same error whether I tried what parameters I set. like below:
root@edm-g-imx8mm:~# /unit_tests/V4L2/mx6s_v4l2_cap_drm.out -d /dev/video0 -ow 1280 -oh 800 -of test.raw
---- Running < /unit_tests/V4L2/mx6s_v4l2_cap_drm.out > test ----
Found v4l2 capture device /dev/video0.
VIDIOC_S_PARM failed
I tried to trace the csi function and I found it has an error in mipi_csis_irq_handler:
root@edm-g-imx8mm:/sys/kernel/debug/tracing# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:00.645651000
Setting pipeline to NULL ...
Freeing pipeline ...
root@edm-g-imx8mm:/sys/kernel/debug/tracing# cat trace | less
# tracer: function_graph
#
# CPU DURATION FUNCTION CALLS
# | | | | | | |
2) | v4l2_open() {
2) | mx6s_csi_open() {
2) 1.125 us | mx6s_csi_runtime_resume();
2) | mipi_csis_s_power() {
2) | mipi_csis_runtime_resume() {
2) | mipi_csis_pm_resume() {
2) + 11.125 us | mipi_csis_clk_enable();
2) + 17.125 us | }
2) + 18.500 us | }
2) + 24.375 us | }
2) + 54.125 us | }
2) + 66.125 us | }
2) 8.625 us | v4l2_ioctl();
2) | v4l2_release() {
2) | mx6s_csi_close() {
2) | mipi_csis_s_power() {
2) | mipi_csis_runtime_suspend() {
2) | mipi_csis_pm_suspend() {
2) 1.125 us | mipi_csis_enable_interrupts.isra.0();
2) 1.500 us | mipi_csis_system_enable.isra.0();
2) 4.250 us | mipi_csis_clk_disable();
2) + 11.500 us | }
2) + 13.000 us | }
2) + 21.125 us | }
2) 0.625 us | mx6s_csi_runtime_suspend();
2) + 34.000 us | }
2) + 36.875 us | }
2) | v4l2_open() {
2) | mx6s_csi_open() {
2) 1.125 us | mx6s_csi_runtime_resume();
2) | mipi_csis_s_power() {
2) | mipi_csis_runtime_resume() {
2) | mipi_csis_pm_resume() {
2) + 11.000 us | mipi_csis_clk_enable();
2) + 16.750 us | }
2) + 18.500 us | }
2) + 23.750 us | }
2) + 57.375 us | }
2) + 68.625 us | }
2) 8.375 us | v4l2_ioctl();
2) 3.375 us | v4l2_ioctl();
2) 1.875 us | v4l2_ioctl();
2) 1.625 us | v4l2_ioctl();
2) 1.375 us | v4l2_ioctl();
2) 1.250 us | v4l2_ioctl();
2) 1.000 us | v4l2_ioctl();
2) 1.375 us | v4l2_ioctl();
2) 1.000 us | v4l2_ioctl();
2) 1.000 us | v4l2_ioctl();
2) 1.625 us | v4l2_ioctl();
2) 1.875 us | v4l2_ioctl();
3) | v4l2_ioctl() {
3) 2.500 us | mipi_csis_enum_mbus_code();
3) + 26.875 us | }
3) | v4l2_ioctl() {
3) 1.000 us | mipi_csis_enum_mbus_code();
3) 3.125 us | }
3) 3.375 us | v4l2_ioctl();
3) | v4l2_ioctl() {
3) 2.375 us | mipi_csis_enum_framesizes();
3) 7.375 us | }
3) | v4l2_ioctl() {
3) 0.875 us | mipi_csis_enum_frameintervals();
3) 3.875 us | }
3) | v4l2_ioctl() {
3) 0.750 us | mipi_csis_enum_frameintervals();
3) 2.625 us | }
3) | v4l2_ioctl() {
3) 0.875 us | mipi_csis_enum_framesizes();
3) 4.125 us | }
3) | v4l2_ioctl() {
3) 0.625 us | mipi_csis_enum_frameintervals();
3) 2.875 us | }
3) | v4l2_ioctl() {
3) 0.750 us | mipi_csis_enum_frameintervals();
3) 2.750 us | }
3) | v4l2_ioctl() {
3) 1.250 us | mipi_csis_enum_framesizes();
3) 3.750 us | }
3) | v4l2_ioctl() {
3) 4.000 us | mipi_csis_set_fmt();
3) + 22.375 us | }
3) | v4l2_ioctl() {
3) 5.250 us | mipi_csis_set_fmt();
3) + 35.000 us | }
3) | v4l2_ioctl() {
3) 1.375 us | mipi_csis_g_parm();
3) 6.125 us | }
3) 3.500 us | v4l2_ioctl();
3) 1.375 us | v4l2_ioctl();
3) 8.000 us | v4l2_ioctl();
3) 2.250 us | v4l2_ioctl();
3) 2.000 us | v4l2_ioctl();
3) 1.625 us | v4l2_ioctl();
3) 1.375 us | v4l2_ioctl();
3) 2.000 us | v4l2_ioctl();
3) # 7862.500 us | v4l2_ioctl();
3) + 15.625 us | v4l2_ioctl();
3) 2.875 us | v4l2_ioctl();
3) 1.750 us | v4l2_ioctl();
3) + 38.750 us | v4l2_ioctl();
3) + 10.250 us | v4l2_ioctl();
3) + 11.875 us | v4l2_ioctl();
3) 3.375 us | v4l2_ioctl();
3) + 13.375 us | v4l2_ioctl();
3) 3.500 us | v4l2_ioctl();
3) | v4l2_ioctl() {
3) | mipi_csis_s_stream() {
3) | mipi_csis_start_stream() {
3) 2.000 us | mipi_csis_system_enable.isra.0();
3) 1.375 us | mipi_csis_enable_interrupts.isra.0();
3) + 22.250 us | }
0) 1.250 us | } /* mipi_csis_irq_handler */
0) 1.250 us | mipi_csis_irq_handler();
0) 1.250 us | mipi_csis_irq_handler();
0) 1.125 us | mipi_csis_irq_handler();
0) 1.125 us | mipi_csis_irq_handler();
0) 1.125 us | mipi_csis_irq_handler();
...
0) 1.375 us | mipi_csis_irq_handler();
0) 1.500 us | mipi_csis_irq_handler();
0) 1.375 us | mipi_csis_irq_handler();
0) 2.125 us | mipi_csis_irq_handler();
0) 1.500 us | mipi_csis_irq_handler();
0) 1.375 us | mipi_csis_irq_handler();
------------------------------------------
0) <idle>-0 => gst-lau-892
------------------------------------------
0) 2.250 us | mipi_csis_enable_interrupts.isra.0();
0) 1.875 us | mipi_csis_system_enable.isra.0();
0) * 86738.87 us | } /* mipi_csis_s_stream */
0) * 87064.87 us | } /* v4l2_ioctl */
0) ! 968.875 us | v4l2_ioctl();
0) | v4l2_release() {
0) | mx6s_csi_close() {
0) | mipi_csis_s_power() {
0) | mipi_csis_runtime_suspend() {
0) | mipi_csis_pm_suspend() {
0) 1.500 us | mipi_csis_enable_interrupts.isra.0();
0) 1.750 us | mipi_csis_system_enable.isra.0();
0) 8.250 us | mipi_csis_clk_disable();
0) + 22.375 us | }
0) + 24.625 us | }
0) + 41.125 us | }
0) 1.125 us | mx6s_csi_runtime_suspend();
0) + 63.750 us | }
0) + 74.250 us | }
So I print the error log in mipi_csis_irq_handler:
static irqreturn_t mipi_csis_irq_handler(int irq, void *dev_id)
{
struct csi_state *state = dev_id;
struct csis_pktbuf *pktbuf = &state->pkt_buf;
unsigned long flags;
u32 status;
status = mipi_csis_read(state, MIPI_CSIS_INTSRC);
spin_lock_irqsave(&state->slock, flags);
if ((status & MIPI_CSIS_INTSRC_NON_IMAGE_DATA) && pktbuf->data) {
u32 offset;
if (status & MIPI_CSIS_INTSRC_EVEN)
offset = MIPI_CSIS_PKTDATA_EVEN;
else
offset = MIPI_CSIS_PKTDATA_ODD;
memcpy(pktbuf->data, state->regs + offset, pktbuf->len);
pktbuf->data = NULL;
rmb();
}
/* Update the event/error counters */
if ((status & MIPI_CSIS_INTSRC_ERRORS) || debug) {
int i;
for (i = 0; i < MIPI_CSIS_NUM_EVENTS; i++) {
if (!(status & state->events[i].mask))
continue;
state->events[i].counter++;
printk("%s: %d\n",
state->events[i].name,
state->events[i].counter);
}
printk("status: %08x\n", status);
}
spin_unlock_irqrestore(&state->slock, flags);
mipi_csis_write(state, MIPI_CSIS_INTSRC, status);
return IRQ_HANDLED;
}
-----------------------------------------------------------------------------------------------------------
First, I enable 1280x800, I got the error when I sent "Ctrl + C" to close camera:
root@edm-g-imx8mm:~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:03.305730125
Setting pipeline to NULL ...
[ 8936.573147] FIFO Overflow Error: 1
[ 8936.576560] Frame Start: 1
[ 8936.579265] Frame End: 1
[ 8936.581797] status: 01100010
Total showed frames (95), playing for (0:00:03.305677000), fps (28.738).
Then I tried to enable 1280x800 again, I got the error log below that:
root@edm-g-imx8mm:~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 71.858138] FIFO Overflow Error: 1
[ 71.861552] Frame Start: 1
[ 71.864258] status: 01000010
[ 71.867166] FIFO Overflow Error: 2
[ 71.870568] status: 00000010
[ 71.875955] FIFO Overflow Error: 3
[ 71.879360] status: 00000010
[ 71.882268] FIFO Overflow Error: 4
[ 71.885673] status: 00000010
[ 71.888569] FIFO Overflow Error: 5
[ 71.891969] status: 00000010
[ 71.909285] FIFO Overflow Error: 6
[ 71.912686] status: 00000010
[ 71.915577] FIFO Overflow Error: 7
[ 71.918975] status: 00000010
[ 71.921865] FIFO Overflow Error: 8
[ 71.925264] status: 00000010
[ 71.942623] FIFO Overflow Error: 9
[ 71.946028] status: 00000010
[ 71.948931] FIFO Overflow Error: 10
...
If I enable 1280x720, it can work and has no error log:
root@edm-g-imx8mm:~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:04.9 / 99:99:99.
I use gstreamer to test our camera, below that:
Camera: MIPI speed=400M
CSI: mxc_mipi-csi 32e30000.mipi_csi: lanes: 4, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 400000000
Res=1280x720 (it can work)
root@edm-g-imx8mm:~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=720 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:02.6 / 99:99:99.
Res: 1280x800 (it cannot work, no error log but it cannot preview any image.)
root@edm-g-imx8mm:~# gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1280,height=800 ! imxvideoconvert_g2d ! fpsdisplaysink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
I think it just cannot decode the MIPI data, and the problem is related clock frequency.
However, I don't know how to decide the better clock-frequency and how to decide the better camera's mipi speed.
Despite using the default clock-frequency 333M, it still has the same problem.
By the way, If I firstly enable 1280x800 for the camera, it can work! But it only can work the first time.
If I want to enable 1280x800 again, it cannot work and doesn't preview any image.
Then 1280x720 always can work whenever I enabled the camera.