Camera driver adaption issues

Hello There,

I am currently trying to implement a camera driver for the Jetson Xavier NX and I run into some errors while trying to get the camera stream working.

Overview

Driver Base: nv_imx477.c
Linux Version: L4T 35.3.1

RCE Image

The trace log was captured with the following RCE firmware provided by NVIDIA:

Mode used for testing

Property value
WIDTH 4000
HEIGHT 3000
FPS 30
Lanes 4
Mbps 2496.00

Debugging

nvargus_nvraw

nvargus_nvraw is able to read the camera modes. That would verify my settings for the tcp modules.

log

Command: nvargus_nvraw --lps

nvargus_nvraw version 1.14.0
Number of supported sensor entries 1
Entry  Source Mode      Uniquename             Resolution   FR  BitDepth  Mode
Index  Index  Index                                             CSI Dyn   Type
  0      0      0     sony_topright_imx586   4000x3000   29  10  10    Bayer

media-ctl

The media-ctl output doesn’t shown any errors in the CSI/VI part of the devicetree, so I assume that there is everything okay with that part.

log

Command: media-ctl -p -d /dev/media0

Media controller API version 5.10.104

Media device information
------------------------
driver          tegra-camrtc-ca
model           NVIDIA Tegra Video Input Device
serial
bus info
hw revision     0x3
driver version  5.10.104

Device topology
- entity 1: 13e10000.host1x:nvcsi@15a00000- (2 pads, 0 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev0
        pad0: Sink
        pad1: Source

- entity 4: 13e10000.host1x:nvcsi@15a00000- (2 pads, 2 links)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev1
        pad0: Sink
                <- "imx586 1-0010":0 [ENABLED]
        pad1: Source
                -> "vi-output, imx586 1-0010":0 [ENABLED]

- entity 7: 13e10000.host1x:nvcsi@15a00000- (2 pads, 0 link)
            type V4L2 subdev subtype Unknown flags 0
            device node name /dev/v4l-subdev2
        pad0: Sink
        pad1: Source

- entity 10: 13e10000.host1x:nvcsi@15a00000- (2 pads, 0 link)
             type V4L2 subdev subtype Unknown flags 0
             device node name /dev/v4l-subdev3
        pad0: Sink
        pad1: Source

- entity 13: imx586 1-0010 (1 pad, 1 link)
             type V4L2 subdev subtype Sensor flags 0
             device node name /dev/v4l-subdev4
        pad0: Source
                [fmt:SRGGB10_1X10/4000x3000 field:none colorspace:srgb]
                -> "13e10000.host1x:nvcsi@15a00000-":0 [ENABLED]

- entity 15: vi-output, imx586 1-0010 (1 pad, 1 link)
             type Node subtype V4L flags 0
             device node name /dev/video0
        pad0: Sink
                <- "13e10000.host1x:nvcsi@15a00000-":1 [ENABLED]

V4l2 Frames

Script cat ./v4l_stream_imx586.sh

#!/bin/bash

v4l2-ctl -d /dev/video0 --set-fmt-video=width=4000,height=3000,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=10 --stream-to=video0.raw --verbose

GST streaming

Script: stream.sh

#!/bin/bash

gst-launch-1.0 nvarguscamerasrc sensor-id=$1 ! 'video/x-raw(memory:NVMM), width=(int)4000, height=(int)3000, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! queue ! fpsdisplaysink video-sink=xvimagesink --verbose # xvimagesink

log

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstXvImageSink:xvimagesink0: sync = true
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)4000, height=(int)3000, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)4000, height=(int)3000, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw, width=(int)4000, height=(int)3000, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:sink: caps = video/x-raw, width=(int)4000, height=(int)3000, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstQueue:queue0.GstPad:src: caps = video/x-raw, width=(int)4000, height=(int)3000, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = video/x-raw, width=(int)4000, height=(int)3000, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:src: caps = video/x-raw, width=(int)4000, height=(int)3000, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstXvImageSink:xvimagesink0.GstPad:sink: caps = video/x-raw, width=(int)4000, height=(int)3000, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstTextOverlay:fps-display-text-overlay.GstPad:video_sink: caps = video/x-raw, width=(int)4000, height=(int)3000, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0.GstGhostPad:sink: caps = video/x-raw, width=(int)4000, height=(int)3000, framerate=(fraction)30/1, format=(string)YUY2
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)4000, height=(int)3000, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)4000, height=(int)3000, format=(string)NV12, framerate=(fraction)30/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4000 x 3000 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 16.000000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 0
   Output Stream W = 4000 H = 3000
   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)
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstXvImageSink:xvimagesink0: sync = true
Got EOS from element "pipeline0".
Execution ended after 0:00:04.050000481
Setting pipeline to NULL ...
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
(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)
Freeing pipeline ...
(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 InvalidState: Argus client is exiting with 4 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)

DMESG log

log

[Sep11 08:47] [RCE] NVCSILP clock rate = 204000000 Hz.
[  +7.637080] imx586 1-0010: probing v4l2 sensor at addr 0x10
[  +0.000011] imx586 1-0010: Debug: alloc ok
[  +0.000006] imx586 1-0010: Debug: tegra cam props ok
[  +0.000137] imx586 1-0010: mclk name not present, assume sensor driven externally
[  +0.000008] imx586 1-0010: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[  +0.000086] imx586 1-0010: tegracam sensor driver:imx586_v2.0.6
[  +0.000006] imx586 1-0010: Debug: tegra cam registration ok
[  +0.000005] imx586 1-0010: Debug: tegra cam set data ok
[  +0.000005] imx586 1-0010: imx586_power_on: power on
[  +0.302548] imx586 1-0010: imx586_power_off: power off
[  +0.000101] imx586 1-0010: Debug: imx586_board_setup ok
[  +0.000120] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx586 1-0010 bound
[  +0.003011] imx586 1-0010: Debug: tegracam_v4l2subdev_register ok
[  +0.000013] imx586 1-0010: detected imx586 sensor
[  +0.001738] imx586 2-0010: probing v4l2 sensor at addr 0x10
[  +0.000014] imx586 2-0010: Debug: alloc ok
[  +0.000006] imx586 2-0010: Debug: tegra cam props ok
[  +0.000157] imx586 2-0010: mclk name not present, assume sensor driven externally
[  +0.000009] imx586 2-0010: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[  +0.000097] imx586 2-0010: tegracam sensor driver:imx586_v2.0.6
[  +0.000006] imx586 2-0010: Debug: tegra cam registration ok
[  +0.000005] imx586 2-0010: Debug: tegra cam set data ok
[  +0.000006] imx586 2-0010: imx586_power_on: power on
[  +0.025024] imx586 1-0010: imx586_open:
[  +0.276140] imx586 2-0010: imx586_board_setup: error during i2c read probe (-121)
[  +0.000228] imx586 2-0010: imx586_power_off: power off
[  +0.000049] imx586 2-0010: board setup failed
[  +0.000286] imx586: probe of 2-0010 failed with error -121
[  +0.000335] imx586 7-0010: probing v4l2 sensor at addr 0x10
[  +0.000013] imx586 7-0010: Debug: alloc ok
[  +0.000008] imx586 7-0010: Debug: tegra cam props ok
[  +0.000186] imx586 7-0010: mclk name not present, assume sensor driven externally
[  +0.000012] imx586 7-0010: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[  +0.000121] imx586 7-0010: tegracam sensor driver:imx586_v2.0.6
[  +0.000008] imx586 7-0010: Debug: tegra cam registration ok
[  +0.000008] imx586 7-0010: Debug: tegra cam set data ok
[  +0.000008] imx586 7-0010: imx586_power_on: power on
[  +0.300737] imx586 7-0010: imx586_board_setup: error during i2c read probe (-121)
[  +0.000240] imx586 7-0010: imx586_power_off: power off
[  +0.000044] imx586 7-0010: board setup failed
[  +0.000308] imx586: probe of 7-0010 failed with error -121
[  +0.000316] imx586 8-0010: probing v4l2 sensor at addr 0x10
[  +0.000013] imx586 8-0010: Debug: alloc ok
[  +0.000008] imx586 8-0010: Debug: tegra cam props ok
[  +0.000173] imx586 8-0010: mclk name not present, assume sensor driven externally
[  +0.000011] imx586 8-0010: avdd, iovdd and/or dvdd reglrs. not present, assume sensor powered independently
[  +0.000119] imx586 8-0010: tegracam sensor driver:imx586_v2.0.6
[  +0.000008] imx586 8-0010: Debug: tegra cam registration ok
[  +0.000008] imx586 8-0010: Debug: tegra cam set data ok
[  +0.000008] imx586 8-0010: imx586_power_on: power on
[  +0.300616] imx586 8-0010: imx586_board_setup: error during i2c read probe (-121)
[  +0.000268] imx586 8-0010: imx586_power_off: power off
[  +0.000043] imx586 8-0010: board setup failed
[  +0.000313] imx586: probe of 8-0010 failed with error -121
[ +19.001356] imx586 1-0010: imx586_open:
[  +0.691786] [RCE] VM0 deactivating.VM0 activating.NVCSILP clock rate = 204000000 Hz.
[  +0.537026] NVRM: No NVIDIA GPU found.
[  +0.366973] [RCE] tegra_nvcsi_stream_tpg_disable(vm0, stream=4, vc=0)
[  +0.000016] [RCE] tegra_nvcsi_stream_tpg_disable: channel 0 is already disabled
[  +0.026110] imx586 1-0010: imx586_power_on: power on
[  +0.303736] imx586 1-0010: imx586_set_mode:
[  +0.143786] imx586 1-0010: imx586_set_gain: Setting gain control to: 16
[  +0.000011] imx586 1-0010: imx586_set_gain: val: 16 (/16) [times], gain: 1008
[  +0.000928] imx586 1-0010: imx586_set_exposure: Setting exposure control to: 33330
[  +0.000008] imx586 1-0010: imx586_set_exposure: val: 33330 [us], coarse_time: 3414 [lines]
[  +0.000899] imx586 1-0010: imx586_set_frame_rate: Setting framerate control to: 30000000
[  +0.000007] imx586 1-0010: imx586_set_frame_rate: val: 30000000e-6 [fps], frame_length: 3415 [lines]
[  +0.001655] imx586 1-0010: imx586_start_streaming:
[  +0.030809] [RCE] tegra_nvcsi_stream_set_config(vm0, stream=4, csi=4)
[  +0.000013] [RCE] MIPI clock = 1000000 kHz, tHS-SETTLE = 0, tCLK-SETTLE = 0
[  +0.000006] [RCE] ===== NVCSI Stream Configuration =====
[  +0.000005] [RCE] stream_id: PP 4, csi_port: PORT E
[  +0.000005] [RCE] Brick: PHY 2, Mode: D-PHY
[  +0.000005] [RCE] Partition: CIL A, LP bypass: Enabled, Lanes: 4
[  +0.000005] [RCE] Clock information:
[  +0.000005] [RCE] MIPI clock rate: 1000.00 MHz
[  +0.000005] [RCE] T_HS settle: 0, T_CLK settle: 0
[  +0.000005] [RCE] ======================================
[  +0.000006] [RCE] tegra_nvcsi_stream_open(vm0, stream=4, csi=4)
[  +0.000005] [RCE] nvcsi_calc_ths_settle ths_settle 18
[  +0.000032] [RCE] nvcsi_calc_ths_settle ths_settle 18
[  +0.000005] [RCE] nvcsi_calc_ths_settle ths_settle 18
[  +0.000005] [RCE] nvcsi_calc_tclk_settle tclk_settle 33
[  +0.000005] [RCE] Deskew setup message sent for port 4 num_lane 4
[  +5.959887] [RCE] ISR PHY 2 CIL_A 0x88
[  +0.000018] [RCE] ISR PHY 2 CIL_B 0x88

Trace enable script

Script: trace-on.sh

echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

Log

The V4l2 as well as the Gstreamer command are resulting in the same error. Writing the camera mode manually results in a signal on the CSI clock that corresponds with the framerate provided by the camera mode document

Command: cat /sys/kernel/debug/tracing/trace

# tracer: nop
#
# entries-in-buffer/entries-written: 68/68   #P:4
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
     kworker/1:2-87      [001] ....    79.830206: rtcpu_string: tstamp:3306020356 id:0x04010000 str:"NVCSILP clock rate = 204000000 Hz."
     kworker/1:2-87      [001] ....    79.830241: rtcpu_dbg_set_loglevel: tstamp:3306047524 old:0 new:2
     kworker/1:2-87      [001] ....    85.990189: rtcpu_string: tstamp:3499300714 id:0x04010000 str:"VM0 deactivating."
          v4l_id-2436    [003] ....    87.795985: tegra_channel_open: vi-output, imx586 1-0010
          v4l_id-2436    [003] ....    87.796220: tegra_channel_close: vi-output, imx586 1-0010
 pool-gnome-init-2131    [002] ....    87.802006: tegra_channel_open: vi-output, imx586 1-0010
 pool-gnome-init-2131    [002] ....    87.802580: tegra_channel_close: vi-output, imx586 1-0010
 gst-plugin-scan-2540    [001] ....   107.682706: tegra_channel_open: vi-output, imx586 1-0010
 gst-plugin-scan-2540    [001] ....   107.682747: tegra_channel_close: vi-output, imx586 1-0010
     kworker/1:2-87      [001] ....   108.318149: rtcpu_string: tstamp:4197720832 id:0x04010000 str:"VM0 activating."
     kworker/1:2-87      [001] ....   108.374185: rtcpu_string: tstamp:4197802286 id:0x04010000 str:"NVCSILP clock rate = 204000000 Hz."
  nvargus-daemon-2546    [001] ....   108.585504: tegra_channel_open: vi-output, imx586 1-0010
  nvargus-daemon-2546    [001] ....   108.585731: tegra_channel_close: vi-output, imx586 1-0010
  nvargus-daemon-2546    [001] ....   108.589703: tegra_channel_open: vi-output, imx586 1-0010
  nvargus-daemon-2546    [001] ....   108.589891: tegra_channel_close: vi-output, imx586 1-0010
  nvargus-daemon-2546    [003] ....   108.636817: tegra_channel_open: vi-output, imx586 1-0010
  nvargus-daemon-2546    [003] ....   108.636856: tegra_channel_close: vi-output, imx586 1-0010
  nvargus-daemon-2546    [003] ....   108.637960: tegra_channel_open: vi-output, imx586 1-0010
  nvargus-daemon-2546    [003] ....   108.637986: tegra_channel_close: vi-output, imx586 1-0010
  nvargus-daemon-2546    [003] ....   108.638014: tegra_channel_open: vi-output, imx586 1-0010
  nvargus-daemon-2546    [003] ....   108.638284: tegra_channel_close: vi-output, imx586 1-0010
  nvargus-daemon-2546    [003] ....   108.638324: tegra_channel_open: vi-output, imx586 1-0010
  nvargus-daemon-2546    [003] ....   108.638462: tegra_channel_close: vi-output, imx586 1-0010
  nvargus-daemon-2546    [000] ....   108.701205: tegra_channel_open: vi-output, imx586 1-0010
  nvargus-daemon-2546    [000] ....   108.701248: tegra_channel_close: vi-output, imx586 1-0010
  nvargus-daemon-2546    [000] ....   108.702363: tegra_channel_open: vi-output, imx586 1-0010
  nvargus-daemon-2546    [000] ....   108.702392: tegra_channel_close: vi-output, imx586 1-0010
 CaptureSchedule-2562    [000] ....   109.275793: tegra_channel_open: vi-output, imx586 1-0010
     kworker/1:2-87      [001] ....   109.278164: rtcpu_string: tstamp:4227589230 id:0x04010000 str:"tegra_nvcsi_stream_tpg_disable(vm0, stream=4, vc"
     kworker/1:2-87      [001] ....   109.278180: rtcpu_string: tstamp:4227589367 id:0x04010000 str:"=0)"
     kworker/1:2-87      [001] ....   109.278207: rtcpu_string: tstamp:4227589799 id:0x04010000 str:"tegra_nvcsi_stream_tpg_disable: channel 0 is alr"
     kworker/1:2-87      [001] ....   109.278210: rtcpu_string: tstamp:4227589914 id:0x04010000 str:"eady disabled"
 CaptureSchedule-2562    [000] ....   109.304302: tegra_channel_set_power: imx586 1-0010 : 0x1
 CaptureSchedule-2562    [000] ....   109.304310: camera_common_s_power: status : 0x1
 CaptureSchedule-2562    [000] ....   109.604505: tegra_channel_set_power: 13e10000.host1x:nvcsi@15a00000- : 0x1
 CaptureSchedule-2562    [000] ....   109.604510: csi_s_power: enable : 0x1
 CaptureSchedule-2562    [000] ....   109.604766: tegra_channel_set_stream: enable : 0x1
 CaptureSchedule-2562    [000] ....   109.608027: tegra_channel_set_stream: 13e10000.host1x:nvcsi@15a00000- : 0x1
 CaptureSchedule-2562    [000] ....   109.608031: csi_s_stream: enable : 0x1
 CaptureSchedule-2562    [000] ....   109.608033: tegra_channel_set_stream: imx586 1-0010 : 0x1
     kworker/1:2-87      [001] ....   109.786132: rtcpu_string: tstamp:4242783680 id:0x04010000 str:"tegra_nvcsi_stream_set_config(vm0, stream=4, csi"
     kworker/1:2-87      [001] ....   109.786148: rtcpu_string: tstamp:4242783797 id:0x04010000 str:"=4)"
     kworker/1:2-87      [001] ....   109.786172: rtcpu_string: tstamp:4242784350 id:0x04010000 str:"MIPI clock = 1000000 kHz, tHS-SETTLE = 0, tCLK-S"
     kworker/1:2-87      [001] ....   109.786173: rtcpu_string: tstamp:4242784464 id:0x04010000 str:"ETTLE = 0"
     kworker/1:2-87      [001] ....   109.786179: rtcpu_string: tstamp:4242784753 id:0x04010000 str:"===== NVCSI Stream Configuration ====="
     kworker/1:2-87      [001] ....   109.786185: rtcpu_string: tstamp:4242785093 id:0x04010000 str:"stream_id: PP 4, csi_port: PORT E"
     kworker/1:2-87      [001] ....   109.786190: rtcpu_string: tstamp:4242785433 id:0x04010000 str:"Brick: PHY 2, Mode: D-PHY"
     kworker/1:2-87      [001] ....   109.786195: rtcpu_string: tstamp:4242785826 id:0x04010000 str:"Partition: CIL A, LP bypass: Enabled, Lanes: 4"
     kworker/1:2-87      [001] ....   109.786201: rtcpu_string: tstamp:4242786051 id:0x04010000 str:"Clock information:"
     kworker/1:2-87      [001] ....   109.786205: rtcpu_string: tstamp:4242786478 id:0x04010000 str:"MIPI clock rate: 1000.00 MHz"
     kworker/1:2-87      [001] ....   109.786210: rtcpu_string: tstamp:4242786810 id:0x04010000 str:"T_HS settle: 0, T_CLK settle: 0"
     kworker/1:2-87      [001] ....   109.786216: rtcpu_string: tstamp:4242787110 id:0x04010000 str:"======================================"
     kworker/1:2-87      [001] ....   109.786221: rtcpu_string: tstamp:4242790578 id:0x04010000 str:"tegra_nvcsi_stream_open(vm0, stream=4, csi=4)"
     kworker/1:2-87      [001] ....   109.786226: rtcpu_string: tstamp:4242797632 id:0x04010000 str:"nvcsi_calc_ths_settle ths_settle 18"
     kworker/1:2-87      [001] ....   109.786258: rtcpu_string: tstamp:4242797999 id:0x04010000 str:"nvcsi_calc_ths_settle ths_settle 18"
     kworker/1:2-87      [001] ....   109.786263: rtcpu_string: tstamp:4242798358 id:0x04010000 str:"nvcsi_calc_ths_settle ths_settle 18"
     kworker/1:2-87      [001] ....   109.786268: rtcpu_string: tstamp:4242798710 id:0x04010000 str:"nvcsi_calc_tclk_settle tclk_settle 33"
     kworker/1:2-87      [001] ....   109.786274: rtcpu_string: tstamp:4242799584 id:0x04010000 str:"Deskew setup message sent for port 4 num_lane 4"
     kworker/1:2-87      [001] ....   109.786280: rtcpu_vinotify_event: tstamp:4242864398 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:135770809824 data:0xcd9ce50010000000
     kworker/1:2-87      [001] ....   109.786281: rtcpu_vinotify_event: tstamp:4242864555 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:135770848288 data:0x0000000031000001
     kworker/1:2-87      [001] ....   109.842179: rtcpu_vinotify_event: tstamp:4244329438 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:135804487264 data:0xcd9ce20010000000
     kworker/1:2-87      [001] ....   109.842182: rtcpu_vinotify_event: tstamp:4244329599 cch:1 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:135804526304 data:0x0000000031000002
     kworker/1:2-87      [001] ....   115.746145: rtcpu_string: tstamp:4428485022 id:0x04010000 str:"ISR PHY 2 CIL_A 0x88"
     kworker/1:2-87      [001] ....   115.746174: rtcpu_nvcsi_intr: tstamp:4428484709 class:GLOBAL type:PHY_INTR0 phy:2 cil:0 st:0 vc:0 status:0x00000088
     kworker/1:2-87      [001] ....   115.746176: rtcpu_string: tstamp:4428485481 id:0x04010000 str:"ISR PHY 2 CIL_B 0x88"
     kworker/1:2-87      [001] ....   115.746186: rtcpu_nvcsi_intr: tstamp:4428484709 class:GLOBAL type:PHY_INTR0 phy:2 cil:1 st:0 vc:0 status:0x00000088
     kworker/1:2-87      [001] ....   115.746187: rtcpu_nvcsi_intr: tstamp:4428484709 class:CORRECTABLE_ERR type:PHY_INTR phy:2 cil:0 st:0 vc:0 status:0x00000088
     kworker/1:2-87      [001] ....   115.746188: rtcpu_nvcsi_intr: tstamp:4428484709 class:CORRECTABLE_ERR type:PHY_INTR phy:2 cil:1 st:0 vc:0 status:0x00000088

Nvargus daemon

service nvargus-daemon stop
export enableCamPclLogs=1
export enableCamScfLogs=1
/usr/sbin/nvargus-daemon

log

=== NVIDIA Libargus Camera Service (0.99.33)=== Listening for connections...=== gst-launch-1.0[2767]: Connection established (FFFFBAB57900)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module2
OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module3
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
NvPclHwGetModuleList: WARNING: Could not map module to ISP config string
NvPclHwGetModuleList: No module data found
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: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 3. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 689)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 453)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 333)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 505)
---- imager: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
CAM: serial no file already exists, skips storing againLSC: LSC surface is not based on full res!
---- imager: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 0. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 689)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 453)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 333)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 505)
---- imager: Found override file [/var/nvidia/nvcam/settings/camera_overrides.isp]. ----
(NvCamV4l2) Error ModuleNotPresent: V4L2Device not available (in /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function findDevice(), line 256)
(NvCamV4l2) Error ModuleNotPresent:  (propagating from /dvs/git/dirty/git-master_linux/camera/utils/nvcamv4l2/v4l2_device.cpp, function initialize(), line 60)
(NvOdmDevice) Error ModuleNotPresent:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function initialize(), line 107)
NvPclDriverInitializeData: Unable to initialize driver v4l2_sensor
NvPclInitializeDrivers: error: Failed to init camera sub module v4l2_sensor
NvPclStartPlatformDrivers: Failed to start module drivers
NvPclStateControllerOpen: Failed ImagerGUID 4. (error 0xA000E)
NvPclOpen: PCL Open Failed. Error: 0xf
SCF: Error BadParameter: Sensor could not be opened. (in src/services/capture/CaptureServiceDeviceSensor.cpp, function getSourceFromGuid(), line 689)
SCF: Error BadParameter:  (propagating from src/services/capture/CaptureService.cpp, function addSourceByGuid(), line 453)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function addSourceByIndex(), line 333)
SCF: Error BadParameter:  (propagating from src/api/CameraDriver.cpp, function getSource(), line 505)
=== gst-launch-1.0[2767]: CameraProvider initialized (0xffffb46940c0)SCF: Error BadValue: NvPHSSendThroughputHints (in src/common/CameraPowerHint.cpp, function sendCameraPowerHint(), line 56)
CAM: serial no file already exists, skips storing againLSC: LSC surface is not based on full res!
SCF: Error InvalidState: Timeout waiting on frame start sensor guid 5, capture sequence ID = 0 (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 514)
SCF: Error InvalidState:  (propagating from src/common/Utils.cpp, function workerThread(), line 114)
SCF: Error InvalidState: Worker thread ViCsiHw frameStart failed (in src/common/Utils.cpp, function workerThread(), line 133)
SCF: Error Timeout:  (propagating from src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameEnd(), line 600)
SCF: Error Timeout:  (propagating from src/common/Utils.cpp, function workerThread(), line 114)
SCF: Error Timeout: Worker thread ViCsiHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 133)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc

hello TobidieTopfpflanze,

there shows PHY interrupts,
it looks LP sequence error. normally, it should follow by LP11->LP01->LP00->LP11 sequence.
so, it’s more like a hardware issue. you may probe the MIPI signaling to examine the sequence,
thanks

Hello JerryChang,
There might be indeed an Hardware issue. It seems that our hardware developer messed up the order of the CSI Lanes. I will respond to this thread as soon as I get the new hardware revision.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.