Issue with Raspberry Pi v3 IMX708 on CSI G of Jetson Xavier NX

Dear Community,

I am integrating the driver of the Raspberry Pi v3 based on IMX708 developed by RidgeRun for the Jetson Xavier NX based system (the driver originally supports Jetson Nano / Orin Nano).

The RPi camera is connected to the CSI G. I followed the instruction in the following discussions for the port-index of the VI, NVCSI, and the sensor scopes :

and

The device-tree nodes :

  • VI :
	tegra-capture-vi {
		num-channels = <3>;
		ports {
			#address-cells = <1>;
			#size-cells = <0>;
			vi_port0: port@0 {
				reg = <0>;
				vs_vi_in0: endpoint {
					port-index = <0>;
					bus-width = <4>;
					remote-endpoint = <&vs_csi_out0>;
				};
			};
			vi_port1: port@1 {
				reg = <1>;
				vs_vi_in1: endpoint {
					port-index = <4>;
					bus-width = <1>;
					remote-endpoint = <&vs_csi_out1>;
				};
			};
			vi_port2: port@2 {
				reg = <2>;
				vs_vi_in2: endpoint {
					port-index = <5>;
					bus-width = <2>;
					remote-endpoint = <&vs_csi_out2>;
				};
			};
		};
	};
  • NVCSI
		nvcsi@15a00000 {
			num-channels = <3>;
			#address-cells = <1>;
			#size-cells = <0>;
			csi_chan0: channel@0 {
				reg = <0x0>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan0_port0: port@0 {
						reg = <0>;
						vs_csi_in0: endpoint@0 {
							port-index = <0>;
							bus-width = <4>;
							remote-endpoint = <&vs_cam_out0>;
						};
					};
					csi_chan0_port1: port@1 {
						reg = <1>;
						vs_csi_out0: endpoint@1 {
							remote-endpoint = <&vs_vi_in0>;
						};
					};
				};
			};
			csi_chan1: channel@1 {
				reg = <0x1>;
				discontinuous_clk = "no";
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan1_port0: port@0 {
						reg = <0>;
						vs_csi_in1: endpoint@2 {
							port-index = <4>;
							bus-width = <1>;
							remote-endpoint = <&vs_cam_out1>;
						};
					};
					csi_chan1_port1: port@1 {
						reg = <1>;
						vs_csi_out1: endpoint@3 {
							remote-endpoint = <&vs_vi_in1>;
						};
					};
				};
			};
			csi_chan2: channel@2 {
				reg = <0x2>;
				ports {
					#address-cells = <1>;
					#size-cells = <0>;
					csi_chan2_port0: port@0 {
						reg = <0>;
						vs_csi_in2: endpoint@4 {
							port-index = <6>;
							bus-width = <2>;
							remote-endpoint = <&vs_cam_out2>;
						};
					};
					csi_chan2_port1: port@1 {
						reg = <1>;
						vs_csi_out2: endpoint@5 {
							remote-endpoint = <&vs_vi_in2>;
						};
					};
				};
			};
		};
	};
  • IMX708 :
	i2c@3180000 {
		status = "okay";
		#address-cells = <1>;
		#size-cells = <0>;

		rpiv3_imx708_g@1a {
			status = "okay";
			compatible = "sony,imx708";
			reg = <0x1a>;
			devnode = "video2";
			physical_w = "3.680";
			physical_h = "2.760";
			sensor_model = "imx708";
			use_sensor_mode_id = "true";
			
			reset-gpios = <&tegra_aon_gpio RPI_CAM_PWDN GPIO_ACTIVE_HIGH>;

			/* IMX708_MODE_4608x2592_14fps */
			mode0 {
				mclk_khz = "24000";
				num_lanes = "2";
				tegra_sinterface = "serial_g";
				phy_mode = "DPHY";
				discontinuous_clk = "yes";
				dpcm_enable = "false";
				cil_settletime = "0";
				lane_polarity = "6";

				active_w = "4608";
				active_h = "2592";
				mode_type = "bayer";
				pixel_phase = "rggb";
				csi_pixel_bit_depth = "10";
				readout_orientation = "90";
				line_length = "4808";
				inherent_gain = "1";
				pix_clk_hz = "297600000"; 

				gain_factor = "16";
				framerate_factor = "1000000";
				exposure_factor = "1000000";
				min_gain_val = "16"; 
				max_gain_val = "256"; 
				step_gain_val = "1";
				default_gain = "16";
				min_hdr_ratio = "1";
				max_hdr_ratio = "1";
				min_framerate = "2000000";
				max_framerate = "14000000";
				step_framerate = "1";
				default_framerate = "14000000";
				min_exp_time = "500";
				max_exp_time = "65487";
				step_exp_time = "1";
				default_exp_time = "1600";
				embedded_metadata_height = "4";
			};

			ports {
				#address-cells = <1>;
				#size-cells = <0>;

				port@0 {
					reg = <0>;
					vs_cam_out2: endpoint {
						port-index = <5>;  /* CSI G */
						bus-width = <2>;
						remote-endpoint = <&vs_csi_in2>;
					};
				};
			};
		};
	};

(There are also other cameras/sensors connected to CSI A (4 lanes) and CSI E (1 lane)).

The testing :

  • Maximize clocks
tuxvision@ubuntu:~$ sudo su
root@ubuntu:/home/tuxvision# echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked 
root@ubuntu:/home/tuxvision# echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
root@ubuntu:/home/tuxvision# echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
root@ubuntu:/home/tuxvision# cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
460800000
root@ubuntu:/home/tuxvision# cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
576000000
root@ubuntu:/home/tuxvision# cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
314000000
root@ubuntu:/home/tuxvision# exit
exit
  • Verify the bound device :
tuxvision@ubuntu:~$ v4l2-ctl --all -d /dev/video2
Driver Info:
	Driver name      : tegra-video
	Card type        : vi-output, imx708 2-001a
	Bus info         : platform:tegra-capture-vi:5
	Driver version   : 5.10.104
	Capabilities     : 0x84200001
		Video Capture
		Streaming
		Extended Pix Format
		Device Capabilities
	Device Caps      : 0x04200001
		Video Capture
		Streaming
		Extended Pix Format
Media Driver Info:
	Driver name      : tegra-camrtc-ca
	Model            : NVIDIA Tegra Video Input Device
	Serial           : 
	Bus info         : 
	Media version    : 5.10.104
	Hardware revision: 0x00000003 (3)
	Driver version   : 5.10.104
Interface Info:
	ID               : 0x0300002c
	Type             : V4L Video
Entity Info:
	ID               : 0x0000002a (42)
	Name             : vi-output, imx708 2-001a
	Function         : V4L2 I/O
	Pad 0x0100002b   : 0: Sink
	  Link 0x02000030: from remote pad 0x1000009 of entity '13e10000.host1x:nvcsi@15a00000-': Data, Enabled
Priority: 2
Video input : 0 (Camera 5: ok)
Format Video Capture:
	Width/Height      : 4608/2592
	Pixel Format      : 'RG10' (10-bit Bayer RGRG/GBGB)
	Field             : None
	Bytes per Line    : 9216
	Size Image        : 23887872
	Colorspace        : sRGB
	Transfer Function : Default (maps to sRGB)
	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
	Quantization      : Default (maps to Full Range)
	Flags             : 

Camera Controls

                     group_hold 0x009a2003 (bool)   : default=0 value=0 flags=execute-on-write
                    sensor_mode 0x009a2008 (int64)  : min=0 max=1 step=1 default=0 value=0 flags=slider
                           gain 0x009a2009 (int64)  : min=16 max=256 step=1 default=16 value=16 flags=slider
                       exposure 0x009a200a (int64)  : min=500 max=65487 step=1 default=1600 value=500 flags=slider
                     frame_rate 0x009a200b (int64)  : min=2000000 max=14000000 step=1 default=14000000 value=2000000 flags=slider
           sensor_configuration 0x009a2032 (u32)    : min=0 max=4294967295 step=1 default=0 [22] flags=read-only, volatile, has-payload
         sensor_mode_i2c_packet 0x009a2033 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
      sensor_control_i2c_packet 0x009a2034 (u32)    : min=0 max=4294967295 step=1 default=0 [1026] flags=read-only, volatile, has-payload
                    bypass_mode 0x009a2064 (intmenu): min=0 max=1 default=0 value=0
				0: 0 (0x0)
				1: 1 (0x1)
                override_enable 0x009a2065 (intmenu): min=0 max=1 default=0 value=0
				0: 0 (0x0)
				1: 1 (0x1)
                   height_align 0x009a2066 (int)    : min=1 max=16 step=1 default=1 value=1
                     size_align 0x009a2067 (intmenu): min=0 max=2 default=0 value=0
				0: 1 (0x1)
				1: 65536 (0x10000)
				2: 131072 (0x20000)
               write_isp_format 0x009a2068 (int)    : min=1 max=1 step=1 default=1 value=1
       sensor_signal_properties 0x009a2069 (u32)    : min=0 max=4294967295 step=1 default=0 [30][18] flags=read-only, has-payload
        sensor_image_properties 0x009a206a (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
      sensor_control_properties 0x009a206b (u32)    : min=0 max=4294967295 step=1 default=0 [30][36] flags=read-only, has-payload
              sensor_dv_timings 0x009a206c (u32)    : min=0 max=4294967295 step=1 default=0 [30][16] flags=read-only, has-payload
               low_latency_mode 0x009a206d (bool)   : default=0 value=0
               preferred_stride 0x009a206e (int)    : min=0 max=65535 step=1 default=0 value=0
                   sensor_modes 0x009a2082 (int)    : min=0 max=30 step=1 default=30 value=1 flags=read-only

  • Stream with V4L2 but FAILED as the below v4l2-ctl command hung :
tuxvision@ubuntu:~$ v4l2-ctl --set-fmt-video=width=4608,height=2592,pixelformat=RG10 --stream-mmap --stream-count=100 -d /dev/video2 
^C^C

and dmesg gave :

[  213.994160] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  213.994503] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  213.995268] (NULL device *): vi_capture_control_message: NULL VI channel received
[  213.995431] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[  213.995680] (NULL device *): vi_capture_control_message: NULL VI channel received
[  213.995838] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 5 vc- 0
[  213.996436] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  216.554148] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  216.554425] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  216.555254] (NULL device *): vi_capture_control_message: NULL VI channel received
[  216.555404] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[  216.555636] (NULL device *): vi_capture_control_message: NULL VI channel received
[  216.555778] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 5 vc- 0
[  216.556363] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  219.114115] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  219.114353] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  219.115248] (NULL device *): vi_capture_control_message: NULL VI channel received
[  219.115419] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[  219.115652] (NULL device *): vi_capture_control_message: NULL VI channel received
[  219.115943] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 5 vc- 0
[  219.116528] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  221.674132] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  221.674413] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  221.675339] (NULL device *): vi_capture_control_message: NULL VI channel received
[  221.675512] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[  221.675738] (NULL device *): vi_capture_control_message: NULL VI channel received
[  221.675910] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 5 vc- 0
[  221.676501] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  224.202113] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  224.202341] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  224.203245] (NULL device *): vi_capture_control_message: NULL VI channel received
[  224.203466] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[  224.203730] (NULL device *): vi_capture_control_message: NULL VI channel received
[  224.203897] t194-nvcsi 13e10000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 5 vc- 0
[  224.204433] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

Could you help to point out the issue, please?

Note : I am using Jetpack-5.1(L4T-R35.2.1).

Thanks in advance and best regards,
Khang

Additional trace :

root@ubuntu:/home/tuxvision# cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 71/71   #P:6
#
#                                _-----=> irqs-off
#                               / _----=> need-resched
#                              | / _---=> hardirq/softirq
#                              || / _--=> preempt-depth
#                              ||| /     delay
#           TASK-PID     CPU#  ||||   TIMESTAMP  FUNCTION
#              | |         |   ||||      |         |
     kworker/5:1-77      [005] ....   976.624540: rtcpu_dbg_set_loglevel: tstamp:31328271079 old:0 new:2
     kworker/5:1-77      [005] ....   982.000571: rtcpu_string: tstamp:31494973950 id:0x04010000 str:"VM0 deactivating."
        v4l2-ctl-2186    [000] ....   997.533457: tegra_channel_open: vi-output, ev9500m 8-0010
        v4l2-ctl-2186    [000] ....   997.533507: tegra_channel_close: vi-output, ev9500m 8-0010
        v4l2-ctl-2186    [000] ....   997.533606: tegra_channel_open: vi-output, nv_adv7280 8-0020
        v4l2-ctl-2186    [000] ....   997.533634: tegra_channel_close: vi-output, nv_adv7280 8-0020
        v4l2-ctl-2186    [000] ....   997.533665: tegra_channel_open: vi-output, imx708 2-001a
        v4l2-ctl-2186    [000] ....   997.533690: tegra_channel_close: vi-output, imx708 2-001a
        v4l2-ctl-2186    [000] ....   997.534849: tegra_channel_open: vi-output, ev9500m 8-0010
        v4l2-ctl-2186    [000] ....   997.535703: tegra_channel_close: vi-output, ev9500m 8-0010
        v4l2-ctl-2187    [003] ....  1013.606913: tegra_channel_open: vi-output, imx708 2-001a
        v4l2-ctl-2187    [003] ....  1013.641610: tegra_channel_set_power: imx708 2-001a : 0x1
        v4l2-ctl-2187    [003] ....  1013.641628: camera_common_s_power: status : 0x1
        v4l2-ctl-2187    [003] ....  1013.941970: tegra_channel_set_power: 13e10000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-2187    [003] ....  1013.942002: csi_s_power: enable : 0x1
        v4l2-ctl-2187    [003] ....  1013.946321: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
        v4l2-ctl-2187    [003] ....  1013.979154: tegra_channel_set_stream: enable : 0x1
     kworker/5:1-77      [005] ....  1013.980927: rtcpu_string: tstamp:32495715314 id:0x04010000 str:"VM0 activating."
        v4l2-ctl-2187    [003] ....  1013.993581: tegra_channel_set_stream: 13e10000.host1x:nvcsi@15a00000- : 0x1
        v4l2-ctl-2187    [003] ....  1013.993584: csi_s_stream: enable : 0x1
        v4l2-ctl-2187    [003] ....  1013.994026: tegra_channel_set_stream: imx708 2-001a : 0x1
     kworker/5:1-77      [005] ....  1014.036834: rtcpu_vinotify_event: tstamp:32496316471 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1039873557600 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1014.036837: rtcpu_vinotify_event: tstamp:32496316635 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1039873569376 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1014.036839: rtcpu_vinotify_event: tstamp:32496316810 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1039873741600 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1014.036840: rtcpu_vinotify_event: tstamp:32496316961 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1039873753600 data:0x0000000031000002
     kworker/5:1-77      [005] ....  1014.148864: rtcpu_nvcsi_intr: tstamp:32500031478 class:GLOBAL type:PHY_INTR0 phy:3 cil:0 st:0 vc:0 status:0x00000010
 vi-output, imx7-2189    [004] ....  1016.606963: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1016.615572: rtcpu_vinotify_event: tstamp:32578375747 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1042501795200 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1016.615575: rtcpu_vinotify_event: tstamp:32578375894 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1042501806976 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1016.615577: rtcpu_vinotify_event: tstamp:32578376057 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1042501862080 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1016.615578: rtcpu_vinotify_event: tstamp:32578376198 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1042501874016 data:0x0000000031000002
 vi-output, imx7-2189    [001] ....  1019.166969: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1019.188900: rtcpu_vinotify_event: tstamp:32658400305 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1045061777056 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1019.188903: rtcpu_vinotify_event: tstamp:32658400451 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1045061788832 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1019.188904: rtcpu_vinotify_event: tstamp:32658400616 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1045061844672 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1019.188905: rtcpu_vinotify_event: tstamp:32658400756 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1045061856608 data:0x0000000031000002
 vi-output, imx7-2189    [001] ....  1021.726926: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1021.764921: rtcpu_vinotify_event: tstamp:32738181697 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1047621716224 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1021.764925: rtcpu_vinotify_event: tstamp:32738181847 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1047621728000 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1021.764926: rtcpu_vinotify_event: tstamp:32738182010 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1047621774848 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1021.764927: rtcpu_vinotify_event: tstamp:32738182150 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1047621786848 data:0x0000000031000002
 vi-output, imx7-2189    [001] ....  1024.286974: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1024.340964: rtcpu_vinotify_event: tstamp:32818212281 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1050181762080 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1024.340970: rtcpu_vinotify_event: tstamp:32818212431 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1050181773856 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1024.340971: rtcpu_vinotify_event: tstamp:32818212595 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1050181828992 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1024.340972: rtcpu_vinotify_event: tstamp:32818212737 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1050181840928 data:0x0000000031000002
 vi-output, imx7-2189    [004] ....  1026.846916: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1026.860984: rtcpu_vinotify_event: tstamp:32898237193 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1052741719616 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1026.860988: rtcpu_vinotify_event: tstamp:32898237342 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1052741731424 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1026.860989: rtcpu_vinotify_event: tstamp:32898237505 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1052741777600 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1026.860990: rtcpu_vinotify_event: tstamp:32898237647 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1052741789504 data:0x0000000031000002
 vi-output, imx7-2189    [001] ....  1029.407033: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1029.437011: rtcpu_vinotify_event: tstamp:32978261721 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1055301870304 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1029.437014: rtcpu_vinotify_event: tstamp:32978261867 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1055301882080 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1029.437016: rtcpu_vinotify_event: tstamp:32978262033 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1055301937184 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1029.437017: rtcpu_vinotify_event: tstamp:32978262175 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1055301949856 data:0x0000000031000002
 vi-output, imx7-2189    [001] ....  1031.967025: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1032.013041: rtcpu_vinotify_event: tstamp:33058185741 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1057861827360 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1032.013044: rtcpu_vinotify_event: tstamp:33058185891 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1057861839168 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1032.013045: rtcpu_vinotify_event: tstamp:33058186053 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1057861903776 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1032.013046: rtcpu_vinotify_event: tstamp:33058186209 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1057861915744 data:0x0000000031000002
 vi-output, imx7-2189    [001] ....  1034.527018: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1034.533094: rtcpu_vinotify_event: tstamp:33138209322 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1060421828288 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1034.533097: rtcpu_vinotify_event: tstamp:33138209485 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1060421840096 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1034.533098: rtcpu_vinotify_event: tstamp:33138209650 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1060421895200 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1034.533099: rtcpu_vinotify_event: tstamp:33138209790 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1060421907136 data:0x0000000031000002
 vi-output, imx7-2189    [001] ....  1037.087084: tegra_channel_capture_setup: vnc_id 0 W 4608 H 2592 fmt c4
     kworker/5:1-77      [005] ....  1037.108934: rtcpu_vinotify_event: tstamp:33218234178 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1062981890752 data:0xcd9ce50010000000
     kworker/5:1-77      [005] ....  1037.108938: rtcpu_vinotify_event: tstamp:33218234327 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1062981902528 data:0x0000000031000001
     kworker/5:1-77      [005] ....  1037.108939: rtcpu_vinotify_event: tstamp:33218234493 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1062981949376 data:0xcd9ce20010000000
     kworker/5:1-77      [005] ....  1037.108940: rtcpu_vinotify_event: tstamp:33218234633 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:1062981961312 data:0x0000000031000002

The trace log shows didn’t receive any data from the sensor.
Maybe probe the sensor output signal to check.

hello khang.l4es,

it looks incorrect polarity settings, there’re only CSI0 D1 and CSI1 D0 P/N will always been swizzled for P/N.

please give it a try to configure… lane_polarity = "0"; and test again .

Hi @JerryChang and @ShaneCCC ,

Thanks for the hint. I am now able to stream with v4l2-ctl command :

tuxvision@ubuntu:~$ v4l2-ctl --set-fmt-video=width=4608,height=2592,pixelformat=RG10 --set-ctrl=sensor_mode=0 --stream-mmap --set-ctrl bypass_mode=0 --stream-count=500 -d /dev/video2
<<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<<<<<< 14.35 fps
<<<<<<<<<<

But I am still struggling with the gst-launch command :

tuxvision@ubuntu:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=2 ! "video/x-raw(memory:NVMM),width=4608,height=2592,framerate=14/1" ! queue ! nvegltransform ! nveglglessink
Setting pipeline to PAUSED ...

Using winsys: x11 
Pipeline is live and does not need PREROLL ...
Got context from element 'eglglessink0': gst.egl.EGLDisplay=context, display=(GstEGLDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.109288813
Setting pipeline to NULL ...
Freeing pipeline ...

tuxvision@ubuntu:~$ sudo systemctl restart nvargus-daemon.service
tuxvision@ubuntu:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=2 ! "video/x-raw(memory:NVMM), width=(int)4608, height=(int)2592,format=(string)NV12, framerate=(fraction)14/1" ! nvvidconv ! xvimagesink sync=false
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.011950374
Setting pipeline to NULL ...
Freeing pipeline ...

tuxvision@ubuntu:~$ sudo systemctl restart nvargus-daemon.service
tuxvision@ubuntu:~$  gst-launch-1.0 nvarguscamerasrc sensor_id=2 -e ! 'video/x-raw(memory:NVMM),width=4608,height=2592,framerate=10/1, format=NV12' ! fakesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available
Got EOS from element "pipeline0".
Execution ended after 0:00:00.004124728
Setting pipeline to NULL ...
Freeing pipeline ...

I also tried with sensor-id=0 or sensor-id=1 but the same error happened. Could you instruct more, please ?

Best Regards,
Khang

The No cameras available tell the incorrect context of tegra-camera-platform{} like the strings of devname.

hello khang.l4es,

let’s confirm it’s not display related failure.
do you have 4K display? it seems you’re streaming camera sensor with 4608x2592, you may try adding video converter to downscale the resolution to avoid display side issue.
on the other hand, you may give it a try to disable camera preview frames, and print fps for quick checking.
for instance,
$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 sensor-mode=0 ! 'video/x-raw(memory:NVMM),width=1920, height=1080, framerate=30/1, format=NV12' ! nvvidconv ! fpsdisplaysink text-overlay=0 name=sink_0 video-sink=fakesink sync=0 -v

FYI,
Sensor/VI/CSI port bindings should be okay since v4l works,
you may further check tegra-camera-platform{} property settings as they’re used by nvarguscamerasrc actually.

anyways,
it looks this topic has closed, let’s have another new discussion thread for issue follow-up.

1 Like

Dear @JerryChang,

I was also able to stream it with one of the gstreamer commands I shared. It was the issue of proc-device-tree as I forgot to modify the I2C address due to copy-paste :

			cam_module2: module2 {
				status = "okay";
				badge = "jakku_rpiv3_cam_top";
				position = "top";
				orientation = "1";
				cam_module2_drivernode0: drivernode0 {
					pcl_id = "v4l2_sensor";
					devname = "imx708 2-001a";
-					proc-device-tree = "/proc/device-tree/i2c@3180000/rpiv3_imx708_g@20";
+					proc-device-tree = "/proc/device-tree/i2c@3180000/rpiv3_imx708_g@1a";
				};
			};
1 Like

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