Leopard AR0231 GMSL get NvBufSurfaceFromFd Failed on Orin Devkit

Hi NV_Team,

We are using LeopardImaging AR0231RAW_GMSL2 Cameras preview with gst get errors and v4l2 works fine on Orin Devkit, but gst and v4l2 both works fine on Xavier Devkit.

GST preview command failed:

nvidia@orin:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)1928,height=(int)1208' ! nvvidconv flip-method=0 ! 'video/x-raw, format=(string)I420' ! xvimagesink -e
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 1920 x 1208 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 251.188705; Exposure Range min 30000, max 660000000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 1920 H = 1208 
   seconds to Run    = 0 
   Frame Rate = 29.999999 
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
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
WARNING: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Pipeline construction is invalid, please add queues.
Additional debug info:
gstbasesink.c(1209): gst_base_sink_query_latency (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Not enough buffering available for  the processing deadline of 0:00:00.015000000, add enough queues to buffer  0:00:00.015000000 additional data. Shortening processing latency to 0:00:00.000000000.
Got EOS from element "pipeline0".
Execution ended after 0:00:04.010245328
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
GST_ARGUS: Cleaning up
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
GST_ARGUS: Done Success

sys.log:
Jun 22 16:15:17 orin nvargus-daemon[1117]: SCF: Error InvalidState: Timeout waiting on frame start sensor guid 0, capture sequence ID = 0 (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 507)
Jun 22 16:15:17 orin nvargus-daemon[1117]: SCF: Error InvalidState:  (propagating from src/common/Utils.cpp, function workerThread(), line 114)
Jun 22 16:15:17 orin nvargus-daemon[1117]: SCF: Error InvalidState: Worker thread ViCsiHw frameStart failed (in src/common/Utils.cpp, function workerThread(), line 133)
Jun 22 16:15:17 orin nvargus-daemon[1117]: SCF: Error Timeout:  (propagating from src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 593)
Jun 22 16:15:17 orin nvargus-daemon[1117]: SCF: Error Timeout:  (propagating from src/common/Utils.cpp, function workerThread(), line 114)
Jun 22 16:15:17 orin nvargus-daemon[1117]: SCF: Error Timeout: Worker thread ViCsiHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 133)
Jun 22 16:15:17 orin nvargus-daemon: Module_id 30 Severity 2 : (fusa) Error: Timeout  propagating from:/capture/src/fusaViHandler.cpp 700
CSI Tracing
nvidia@orin:~$ sudo cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 10/10   #P:12
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
     kworker/8:3-219     [008] ....    52.071820: rtcpu_string: tstamp:2164318774 id:0x04010000 str:"VM0 deactivating."
     kworker/8:3-219     [008] ....    54.995620: rtcpu_string: tstamp:2256246421 id:0x04010000 str:"VM0 activating."
     kworker/8:3-219     [008] ....    60.267606: rtcpu_string: tstamp:2419789599 id:0x04010000 str:"VM0 deactivating."
     kworker/8:3-219     [008] ....    88.705017: rtcpu_string: tstamp:3309471505 id:0x04010000 str:"VM0 activating."
     kworker/8:3-219     [008] ....    94.265333: rtcpu_string: tstamp:3482122522 id:0x04010000 str:"VM0 deactivating."
     kworker/8:3-219     [008] ....   103.693665: rtcpu_string: tstamp:3778009759 id:0x04010000 str:"VM0 activating."
     kworker/8:3-219     [008] ....   103.973670: rtcpu_vinotify_event: tstamp:3785682278 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:121140903488 data:0xc55cff0010000000
     kworker/8:3-219     [008] ....   103.973673: rtcpu_vinotify_event: tstamp:3785682435 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:121140947200 data:0x0000000031000001
     kworker/8:3-219     [008] ....   103.973674: rtcpu_vinotify_event: tstamp:3786766639 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:121174146080 data:0xc55cfc0010000000
     kworker/8:3-219     [008] ....   103.973675: rtcpu_vinotify_event: tstamp:3786766778 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:121174190496 data:0x0000000031000002

V4L2 get frame success:

nvidia@orin:~$ v4l2-ctl  -V --set-fmt-video width=1928,height=1208,pixelformat=BA12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=5 --stream-to=ar0231.raw  -d /dev/video0

Format Video Capture:
	Width/Height      : 1928/1208
	Pixel Format      : 'BA12' (12-bit Bayer GRGR/BGBG)
	Field             : None
	Bytes per Line    : 3856
	Size Image        : 4658048
	Colorspace        : sRGB
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 
<<<<<

ar0231.raw (4.4 MB)

1 Like