Hello,
We have an FPGA which streams MIPI video. It is connected to Jetson TX2 development board using a custom board. Took ov5693 as a reference driver. We initially had some issue in getting the video stream, however, we were able to resolve it by disabling CRC checks in csi4_fops.c. Custom MIPI Camera:- Gstremaer error: streaming stopped, reason not-negotiated (-4) - #34 by JerryChang. We are now able to receive the video stream using v4l2-ctl, however nvarguscamerasrc doesnot work. We get the following error:
vte-developer@vtedeveloper-desktop:~$ DISPLAY=:0.0 gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=3280, height=2464, format=(string)NV12, framerate=(fraction)7/1' ! nvoverlaysink -e
Invalid MIT-MAGIC-COOKIE-1 keynvbuf_utils: Could not get EGL display connection
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
Invalid MIT-MAGIC-COOKIE-1 keyCONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3264 H = 2464
seconds to Run = 0
Frame Rate = 21.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD... Exiting...
CONSUMER: Done Success
Got EOS from element "pipeline0".
Execution ended after 0:00:04.002826698
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
^C
vte-developer@vtedeveloper-desktop:~$
nvargus-daemon output:
vte-developer@vtedeveloper-desktop:~$ sudo nvargus-daemon &
[1] 10687
vte-developer@vtedeveloper-desktop:~$ === NVIDIA Libargus Camera Service (0.98.3)=== Listening for connections...=== gst-launch-1.0[10690]: Connection established (7F946C71D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
---- imager: No override file found. ----
LSC: LSC surface is not based on full res!
=== gst-launch-1.0[10690]: CameraProvider initialized (0x7f8c8d41b0)LSC: LSC surface is not based on full res!
NvViErrorDecode Stream 0.0 failed: ts 3930408996096 frame 25 error 2 data 0x00400060
NvViErrorDecode CaptureError: CsimuxFrameError (2)
NvViErrorDecode See https://wiki.nvidia.com/wmpwiki/index.php/Camera_Debugging/CaptureError_debugging for more information and links to documents.
CsimuxFrameError_Regular : 0x00400060
Stream ID [ 2: 0]: 0
VPR state from fuse block [ 3]: 0
Frame end (FE) [ 5]: 1
A frame end has been found on a regular mode stream.
CSI_FAULT [ 6]: 1
An FE packet was found and marked with a CSI Error
CSI_CODE [25:20]: 0x4
Check the CSI specification for the meaning. See https://wiki.nvidia.com/wmpwiki/index.php/Camera_Debugging/CaptureError_debugging#CSI_CODE
captureErrorCallback Stream 0.0 capture 1 failed: ts 3930408996096 frame 25 error 2 data 0x00400060
Error: waitCsiFrameStart timeout guid 0
VI Stream Id = 0 Virtual Channel = 0
************VI Debug Registers**********
VI_CSIMUX_STAT_FRAME_0 = 0x00000019
VI_CSIMUX_FRAME_STATUS_0 = 0x00000000
VI_CFG_INTERRUPT_STATUS_0 = 0x3f000000
VI_ISPBUFA_ERROR_0 = 0x00000000
VI_FMLITE_ERROR_0 = 0x00000000
VI_NOTIFY_ERROR_0 = 0x00000000
*****************************************
CSI Stream Id = 0 Brick Id = 0
************CSI Debug Registers**********
CILA_INTR_STATUS_CILA[0x10400] = 0x00000089
CILB_INTR_STATUS_CILB[0x10c00] = 0x00000000
INTR_STATUS[0x100a4] = 0x00000004
INTR_STATUS[0x100a4] = 0x00000004
ERR_INTR_STATUS[0x100ac] = 0x00000004
ERROR_STATUS2VI_VC0[0x10094] = 0x00000004
ERROR_STATUS2VI_VC1[0x10098] = 0x00000000
ERROR_STATUS2VI_VC2[0x1009c] = 0x00000000
ERROR_STATUS2VI_VC3[0x100a0] = 0x00000000
*****************************************
SCF: Error Timeout: (propagating from src/common/Utils.cpp, function workerThread(), line 116)
SCF: Error Timeout: Worker thread ViCsiHw frameStart failed (in src/common/Utils.cpp, function workerThread(), line 133)
SCF: Error Timeout: ISP port 0 timed out! (in src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 492)
waitForIdleLocked remaining request 104
waitForIdleLocked remaining request 103
waitForIdleLocked remaining request 102
waitForIdleLocked remaining request 101
SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 928)
SCF: Error Timeout: (propagating from src/api/Session.cpp, function abortCaptures(), line 894)
SCF: Error Timeout: ISP Stats timed out! (in src/services/capture/NvIspHw.cpp, function waitIspStatsFinished(), line 608)
PowerServiceCore:handleRequests: timePassed = 10257
=== gst-launch-1.0[10690]: Connection closed (7F946C71D0)=== gst-launch-1.0[10690]: There were pending client requests in the server at the time of CameraProvider destruction, and they failed to complete within a reasonable time (1500 ms). This may be due to a hardware or libargus error. Forced destruction will now proceed, which may leave the libargus server in a bad state.=== gst-launch-1.0[10690]: WARNING: CameraProvider was not destroyed before client connection terminated.=== gst-launch-1.0[10690]: The client may have abnormally terminated. Destroying CameraProvider...=== gst-launch-1.0[10690]: CameraProvider destroyed (0x7f8c8d41b0)=== gst-launch-1.0[10690]: WARNING: Cleaning up 1 outstanding requests...=== gst-launch-1.0[10690]: WARNING: Cleaning up 1 outstanding stream settings...=== gst-launch-1.0[10690]: WARNING: Cleaning up 1 outstanding queues...=== gst-launch-1.0[10690]: WARNING: Cleaning up 1 outstanding sessions...waitForIdleLocked remaining request 103
SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 928)
(Argus) Error Timeout: (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 169)
SCF: Error InvalidState: 1 buffers still pending during EGLStreamProducer destruction (propagating from src/services/gl/EGLStreamProducer.cpp, function freeBuffers(), line 309)
SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function ~EGLStreamProducer(), line 50)
waitForIdleLocked remaining request 103
SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 928)
SCF: Error Timeout: (propagating from src/api/Session.cpp, function abortCaptures(), line 894)
SCF: Error Timeout: (propagating from src/api/Session.cpp, function shutdown(), line 406)
PowerServiceCore:handleRequests: timePassed = 27350
SCF: Error Timeout: (propagating from src/api/Session.cpp, function shutdown(), line 506)
SCF: Error Timeout: (propagating from src/api/CameraDriver.cpp, function deleteSession(), line 635)
(Argus) Error Timeout: (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 194)
=== gst-launch-1.0[10690]: WARNING: Cleaning up 1 outstanding streams...=== gst-launch-1.0[10690]: NOTE: Destroy all libargus objects before destroying the CameraProvider to avoid th.
ese warnings.^C
vte-developer@vtedeveloper-desktop:~$
Further, after using nvarguscamerasrc for acquiring data, we cannot get any output from v4l2-ctl --set-fmt-video=width=3280,height=2464,pixelformat=RG10 --stream-mmap --stream-count=300 -d /dev/video0
however when we use v4l2-ctl --stream-mmap -c bypass_mode=0
it starts working again and subsequently v4l2-ctl --set-fmt-video=width=3280,height=2464,pixelformat=RG10 --stream-mmap --stream-count=300 -d /dev/video0
also starts working again. I guess bypass_mode=0 resets something?
Further, while using nvarguscamerasrc I can see I am getting CRC checks error, however, I have already disabled it. How do I proceed from here?
Environment details:
MIPI Ouput from FPGA: RAW10
SOM: Jetson TX2i
L4T: R32.7.3
Interface: Connected to Jetson TX2 development board using a custom board