I use the camera (AR0144) and it supports two resolutions, 1280x800 and 1280x720. When I open the camera use the command:
gst-launch-1.0 v4l2src ! "video/x-raw, format=YUY2, width=1280, height=800" ! waylandsink sync=false
Firstly I open the camera and it can work and display on the screen. However, it cannot work when I run the same command again.
I tried to enable the debug message for imx8_mipi_csi, and I got the messages:
First open:
# gst-launch-1.0 v4l2src ! "video/x-raw, format=YUY2, width=1280, height=800" ! waylandsink sync=false --no-position
[ 1476.418575] mxc-mipi-csi2.1: unsupported csi-sam command -1068476902.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 1500.131243] bypass csc
[ 1500.134005] input fmt YUV4
[ 1500.136711] output fmt YUYV
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:04.035551916
Setting pipeline to NULL ...
[ 1504.326200] mxc-mipi-csi2.1: Frame End events: 112
[ 1504.330995] mxc-mipi-csi2.1: Frame Start events: 113
[ 1504.335959] mxc-mipi-csi2.1: Non-image data after odd frame events: 0
[ 1504.342398] mxc-mipi-csi2.1: Non-image data before odd frame events: 0
[ 1504.348924] mxc-mipi-csi2.1: Non-image data after even frame events: 0
[ 1504.355451] mxc-mipi-csi2.1: Non-image data before even frame events: 0
[ 1504.362064] mxc-mipi-csi2.1: Unknown Error events: 0
[ 1504.367028] mxc-mipi-csi2.1: CRC Error events: 0
[ 1504.371644] mxc-mipi-csi2.1: ECC Error events: 0
[ 1504.376260] mxc-mipi-csi2.1: FIFO Overflow Error events: 2732
[ 1504.382007] mxc-mipi-csi2.1: Lost Frame End Error events: 0
[ 1504.387580] mxc-mipi-csi2.1: Lost Frame Start Error events: 0
[ 1504.393324] mxc-mipi-csi2.1: SOT Error events: 0
Total showed frames (111), playing for (0:00:04.035533792), fps (27.506).
Freeing pipeline ...
Then I open camera again:
# gst-launch-1.0 v4l2src ! "video/x-raw, format=YUY2, width=1280, height=800" ! waylandsink sync=false --no-position
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: Gst[ 1507.418234] bypass csc
SystemClock
[ 1507.421390] input fmt YUV4
[ 1507.425235] output fmt YUYV
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:01.810321782
Setting pipeline to NULL ...
[ 1509.390289] mxc-mipi-csi2.1: Frame End events: 0
[ 1509.394910] mxc-mipi-csi2.1: Frame Start events: 1
[ 1509.399700] mxc-mipi-csi2.1: Non-image data after odd frame events: 0
[ 1509.406140] mxc-mipi-csi2.1: Non-image data before odd frame events: 0
[ 1509.412667] mxc-mipi-csi2.1: Non-image data after even frame events: 0
[ 1509.419193] mxc-mipi-csi2.1: Non-image data before even frame events: 0
[ 1509.425806] mxc-mipi-csi2.1: Unknown Error events: 0
[ 1509.430770] mxc-mipi-csi2.1: CRC Error events: 0
[ 1509.435387] mxc-mipi-csi2.1: ECC Error events: 0
[ 1509.440003] mxc-mipi-csi2.1: FIFO Overflow Error events: 145787
[ 1509.445922] mxc-mipi-csi2.1: Lost Frame End Error events: 0
[ 1509.451492] mxc-mipi-csi2.1: Lost Frame Start Error events: 0
[ 1509.457235] mxc-mipi-csi2.1: SOT Error events: 0
Freeing pipeline ...
There are FIFO Overflow Error events.
If I open the camera with 1280x720. It always can work without any FIFO Overflow Error.
# gst-launch-1.0 v4l2src ! "video/x-raw, format=YUY2, width=1280, height=720" ! waylandsink sync=false --no-position
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSy[ 73.264703] bypass csc
stemClock
[ 73.268061] input fmt YUV4
[ 73.271726] output fmt YUYV
Redistribute latency...
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:02.606334875
Setting pipeline to NULL ...
[ 76.021912] mxc-mipi-csi2.1: Frame End events: 134
[ 76.026706] mxc-mipi-csi2.1: Frame Start events: 134
[ 76.031671] mxc-mipi-csi2.1: Non-image data after odd frame events: 0
[ 76.038111] mxc-mipi-csi2.1: Non-image data before odd frame events: 0
[ 76.044637] mxc-mipi-csi2.1: Non-image data after even frame events: 0
[ 76.051162] mxc-mipi-csi2.1: Non-image data before even frame events: 0
[ 76.057775] mxc-mipi-csi2.1: Unknown Error events: 0
[ 76.062738] mxc-mipi-csi2.1: CRC Error events: 0
[ 76.067354] mxc-mipi-csi2.1: ECC Error events: 0
[ 76.071969] mxc-mipi-csi2.1: FIFO Overflow Error events: 0
[ 76.077453] mxc-mipi-csi2.1: Lost Frame End Error events: 0
[ 76.083023] mxc-mipi-csi2.1: Lost Frame Start Error events: 0
[ 76.088768] mxc-mipi-csi2.1: SOT Error events: 0
Total showed frames (132), playing for (0:00:02.606324125), fps (50.646).
Freeing pipeline ...
WHY it occurred FIFO Overflow Error when I open the camera with 1280x800?
How can I solve the problem?
what's the result when you use the command "v4l2-ctl -d /dev/video0 --list-formats-ext"
By the way, there is the device tree setting for mipi csi:
{
fragment@0 {
target = <&mipi_csi_0>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
clock-frequency = <500000000>;
status = "okay";
port@0 {
reg = <0>;
mipi_csi0_ep: endpoint {
remote-endpoint = <&tevi_ap1302_0_ep>;
data-lanes = <4>;
csis-hs-settle = <19>;
csis-clk-settle = <2>;
csis-wclk;
};
};
};
};
...
Hi,
The result:
# v4l2-ctl -d /dev/video0 --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar
[0]: 'RGBP' (16-bit RGB 5-6-5)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[1]: 'RGB3' (24-bit RGB 8-8-8)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[2]: 'BGR3' (24-bit BGR 8-8-8)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[3]: 'YUYV' (YUYV 4:2:2)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[4]: 'YUV4' (32-bit A/XYUV 8-8-8-8)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[5]: 'NV12' (Y/CbCr 4:2:0)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[6]: 'NM12' (Y/CbCr 4:2:0 (N-C))
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[7]: 'YM24' (Planar YUV 4:4:4 (N-C))
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[8]: 'XR24' (32-bit BGRX 8-8-8-8)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
[9]: 'AR24' (32-bit BGRA 8-8-8-8)
Size: Discrete 1280x720
Interval: Discrete 0.017s (60.000 fps)
Size: Discrete 1280x800
Interval: Discrete 0.017s (60.000 fps)
I'm confused with this, did you use AP1302((ISP) by ISP of imx8mp? what camera do you use? why don't you connect the camera with ISP directly?
Hi Joanxie,
the camera module has included ISP (AR0144+AP1302), so I don't need to use the ISP of imx8mp.