Custom carrier board camera playback failed

HI anyone
I transplanted the code to version R32.4.2 of NX module, the driver was loaded successfully, I could see the device /dev/video0, when I played it with nvgstcaption-1.0, the following error occurred.
Can anyone guide me :How should I analyze what went wrong。

[  159.043486] imx390 0-001a: probing v4l2 sensor.

[ 159.049045] imx390 0-001a: tegracam sensor driver:imx390_v2.0.6
[ 159.049094] tegra194-vi5 15c10000.vi: subdev imx390 0-001a bound
[ 159.050387] imx390 0-001a: Detected IMX390 sensor
[ 161.575432] tegra-i2c 3160000.i2c: no acknowledge from address 0x1a
[ 178.803973] [RCE] WARNING: t194/isp5.c:901 [config_channel] “All error notifications not enabled: correctable=0x00 uncorrectable=0x00”
[ 179.139800] [RCE] vi5_hwinit: firmware CL2018101701 protocol version 2.2
[ 182.837933] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 182.838007] fence timeout on [ffffffc1761276c0] after 1500ms
[ 182.838056] name=[nvhost_sync:41], current value=0 waiting value=1
[ 182.838061] ---- mlocks ----
[ 182.838247] tegra194-vi5 15c10000.vi: vi capture get status failed

[ 182.839947] ---- syncpts ----
[ 182.839962] id 2 (disp_a) min 644 max 644 refs 1 (previous client : )
[ 182.839968] id 3 (disp_b) min 2 max 2 refs 1 (previous client : )
[ 182.839975] id 4 (disp_c) min 2 max 2 refs 1 (previous client : )
[ 182.839999] id 8 (vblank0) min 10321 max -4 refs 1 (previous client : )
[ 182.840016] id 18 (gv11b_511) min 10871 max 10871 refs 1 (previous client : )
[ 182.840021] id 19 (gv11b_510) min 8 max 8 refs 1 (previous client : )
[ 182.840028] id 20 (gv11b_509) min 1726 max 1726 refs 1 (previous client : gv11b_509)
[ 182.840048] id 34 (gv11b_507_user) min 29 max 0 refs 1 (previous client : )
[ 182.840063] id 44 (gv11b_503) min 4 max 4 refs 1 (previous client : )
[ 182.840068] id 45 (gv11b_502) min 3 max 3 refs 1 (previous client : )
[ 182.840074] id 46 (gv11b_501) min 3 max 3 refs 1 (previous client : )
[ 182.840079] id 47 (gv11b_500) min 3 max 3 refs 1 (previous client : )
[ 182.840085] id 48 (gv11b_499) min 3 max 3 refs 1 (previous client : )

[ 182.850537] ---- channels ----
[ 182.850570]
channel 2 - 15820000.se

[ 182.850575] NvHost basic channel registers:
[ 182.850582] CMDFIFO_STAT_0: 00002040
[ 182.850588] CMDFIFO_RDATA_0: 0819400c
[ 182.850597] CMDP_OFFSET_0: 00000000
[ 182.850602] CMDP_CLASS_0: 00000000
[ 182.850607] CHANNELSTAT_0: 00000000
[ 182.850611] The CDMA sync queue is empty.

[ 182.850621]
channel 3 - 15830000.se

[ 182.850624] NvHost basic channel registers:
[ 182.850629] CMDFIFO_STAT_0: 00002040
[ 182.850634] CMDFIFO_RDATA_0: 22109200
[ 182.850641] CMDP_OFFSET_0: 00000000
[ 182.850646] CMDP_CLASS_0: 00000000
[ 182.850651] CHANNELSTAT_0: 00000000
[ 182.850654] The CDMA sync queue is empty.

[ 182.850663]
channel 4 - 15840000.se

[ 182.850667] NvHost basic channel registers:
[ 182.850672] CMDFIFO_STAT_0: 00002040
[ 182.850677] CMDFIFO_RDATA_0: 01018593
[ 182.850683] CMDP_OFFSET_0: 00000000
[ 182.850688] CMDP_CLASS_0: 00000000
[ 182.850692] CHANNELSTAT_0: 00000000
[ 182.850696] The CDMA sync queue is empty.

[ 182.850707]
---- host general irq ----

[ 182.850713] sync_intc0mask = 0x00000001
[ 182.850718] sync_intmask = 0x50000003
[ 182.850722]
---- host syncpt irq mask ----

[ 182.850725]
---- host syncpt irq status ----

[ 182.850731] syncpt_thresh_cpu0_int_status(0) = 0x00000000
[ 182.850736] syncpt_thresh_cpu0_int_status(1) = 0x00000000
[ 182.850741] syncpt_thresh_cpu0_int_status(2) = 0x00000000
[ 182.850746] syncpt_thresh_cpu0_int_status(3) = 0x00000000
[ 182.850751] syncpt_thresh_cpu0_int_status(4) = 0x00000000
[ 182.850757] syncpt_thresh_cpu0_int_status(5) = 0x00000000
[ 182.850762] syncpt_thresh_cpu0_int_status(6) = 0x00000000
[ 182.850767] syncpt_thresh_cpu0_int_status(7) = 0x00000000
[ 182.850772] syncpt_thresh_cpu0_int_status(8) = 0x00000000
[ 182.850777] syncpt_thresh_cpu0_int_status(9) = 0x00000000
[ 182.850783] syncpt_thresh_cpu0_int_status(10) = 0x00000000
[ 182.850788] syncpt_thresh_cpu0_int_status(11) = 0x00000000
[ 182.850793] syncpt_thresh_cpu0_int_status(12) = 0x00000000
[ 182.850798] syncpt_thresh_cpu0_int_status(13) = 0x00000000
[ 182.850803] syncpt_thresh_cpu0_int_status(14) = 0x00000000
[ 182.850808] syncpt_thresh_cpu0_int_status(15) = 0x00000000
[ 182.850813] syncpt_thresh_cpu0_int_status(16) = 0x00000000
[ 182.850818] syncpt_thresh_cpu0_int_status(17) = 0x00000000
[ 182.850823] syncpt_thresh_cpu0_int_status(18) = 0x00000000
[ 182.850828] syncpt_thresh_cpu0_int_status(19) = 0x00000000
[ 182.850833] syncpt_thresh_cpu0_int_status(20) = 0x00000000
[ 182.850838] syncpt_thresh_cpu0_int_status(21) = 0x00000000
[ 184.373128] fence timeout on [ffffffc1d0e8c480] after 1500ms
[ 184.373141] name=[nvhost_sync:41], current value=0 waiting value=9
[ 184.373149] ---- mlocks ----

[ 184.373192] ---- syncpts ----
[ 184.373206] id 2 (disp_a) min 661 max 661 refs 1 (previous client : )
[ 184.373212] id 3 (disp_b) min 2 max 2 refs 1 (previous client : )
[ 184.373218] id 4 (disp_c) min 2 max 2 refs 1 (previous client : )
[ 184.373242] id 8 (vblank0) min 10413 max -4 refs 1 (previous client : )
[ 184.373260] id 18 (gv11b_511) min 11217 max 11217 refs 1 (previous client : )
[ 184.373266] id 19 (gv11b_510) min 8 max 8 refs 1 (previous client : )
[ 184.373272] id 20 (gv11b_509) min 1771 max 1771 refs 1 (previous client : gv11b_509)
[ 184.373292] id 34 (gv11b_507_user) min 29 max 0 refs 1 (previous client : )
[ 184.373307] id 44 (gv11b_503) min 4 max 4 refs 1 (previous client : )
[ 184.373313] id 45 (gv11b_502) min 3 max 3 refs 1 (previous client : )
[ 184.373318] id 46 (gv11b_501) min 3 max 3 refs 1 (previous client : )
[ 184.373324] id 47 (gv11b_500) min 3 max 3 refs 1 (previous client : )
[ 184.373330] id 48 (gv11b_499) min 3 max 3 refs 1 (previous client : )

[ 184.374074] ---- channels ----
[ 184.374113]
channel 2 - 15820000.se

[ 184.374117] NvHost basic channel registers:
[ 184.374124] CMDFIFO_STAT_0: 00002040
[ 184.374129] CMDFIFO_RDATA_0: 0819400c
[ 184.374137] CMDP_OFFSET_0: 00000000
[ 184.374142] CMDP_CLASS_0: 00000000
[ 184.374146] CHANNELSTAT_0: 00000000
[ 184.374150] The CDMA sync queue is empty.

[ 184.374160]
channel 3 - 15830000.se

[ 184.374164] NvHost basic channel registers:
[ 184.374169] CMDFIFO_STAT_0: 00002040
[ 184.374174] CMDFIFO_RDATA_0: 22109200
[ 184.374180] CMDP_OFFSET_0: 00000000
[ 184.374185] CMDP_CLASS_0: 00000000
[ 184.374189] CHANNELSTAT_0: 00000000
[ 184.374193] The CDMA sync queue is empty.

[ 184.374202]
channel 4 - 15840000.se

[ 184.374206] NvHost basic channel registers:
[ 184.374210] CMDFIFO_STAT_0: 00002040
[ 184.374215] CMDFIFO_RDATA_0: 01018593
[ 184.374222] CMDP_OFFSET_0: 00000000
[ 184.374226] CMDP_CLASS_0: 00000000
[ 184.374231] CHANNELSTAT_0: 00000000
[ 184.374235] The CDMA sync queue is empty.

[ 184.374246]
---- host general irq ----

[ 184.374251] sync_intc0mask = 0x00000001
[ 184.374256] sync_intmask = 0x50000003
[ 184.374260]
---- host syncpt irq mask ----

[ 184.374263]
---- host syncpt irq status ----

[ 184.374269] syncpt_thresh_cpu0_int_status(0) = 0x00000000
[ 184.374274] syncpt_thresh_cpu0_int_status(1) = 0x00000000
[ 184.374280] syncpt_thresh_cpu0_int_status(2) = 0x00000000
[ 184.374285] syncpt_thresh_cpu0_int_status(3) = 0x00000000
[ 184.374290] syncpt_thresh_cpu0_int_status(4) = 0x00000000
[ 184.374295] syncpt_thresh_cpu0_int_status(5) = 0x00000000
[ 184.374300] syncpt_thresh_cpu0_int_status(6) = 0x00000000
[ 184.374306] syncpt_thresh_cpu0_int_status(7) = 0x00000000
[ 184.374311] syncpt_thresh_cpu0_int_status(8) = 0x00000000
[ 184.374316] syncpt_thresh_cpu0_int_status(9) = 0x00000000
[ 184.374321] syncpt_thresh_cpu0_int_status(10) = 0x00000000
[ 184.374326] syncpt_thresh_cpu0_int_status(11) = 0x00000000
[ 184.374331] syncpt_thresh_cpu0_int_status(12) = 0x00000000
[ 184.374336] syncpt_thresh_cpu0_int_status(13) = 0x00000000
[ 184.374342] syncpt_thresh_cpu0_int_status(14) = 0x00000000
[ 184.374347] syncpt_thresh_cpu0_int_status(15) = 0x00000000
[ 184.374352] syncpt_thresh_cpu0_int_status(16) = 0x00000000
[ 184.374357] syncpt_thresh_cpu0_int_status(17) = 0x00000000
[ 184.374362] syncpt_thresh_cpu0_int_status(18) = 0x00000000
[ 184.374367] syncpt_thresh_cpu0_int_status(19) = 0x00000000
[ 184.374372] syncpt_thresh_cpu0_int_status(20) = 0x00000000
[ 184.374377] syncpt_thresh_cpu0_int_status(21) = 0x00000000

hello infovlpwm,

above failures means your camera were not able to init successfully, and it’s due to an i2c no ack failure.
could you please review the sensor power-on/off sequence, you should enable all necessary regulators and clocks.
please also refer to Debugging Tips session for troubleshooting.

thanks,
Jerry

Hi JerryChang
I solved the i2c error,now The following error always occurs when I use the nvgstcapture-1.0 command to open the camera.
What could be the cause of this? Where should I check for errors, Any debug tips?
Please give me some guidance.

[RCE] WARNING: t194/isp5.c:901 [config_channel] “All error notifications not enabled: correctable=0x00 uncorrectable=0x00”

Best regards!

hello infovlpwm,

that should be a warning messages, may I know were you able to enable camera stream for preview?
you might gather more logs for investigation.
thanks

Hi JerryChang
I use nvgstcapture-1.0 to play camera. I am not able to enable camera stream for preview.

Bestregards

hello infovlpwm,

please share error logs for checking, you might gather kernel message with $ dmesg
you should also check user-space messages with $ cat /var/log/syslog

BTW,
could you please refer to Approaches for Validating and Testing the V4L2 Driver session.
please have an alternative way to access camera sensor with v4l2 standard controls.
for example,
$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

HI
Thanks for your guide, here are my logs

    nvidia@nvidia-desktop:~$ sudo media-ctl -p -d /dev/media0

Media controller API version 0.1.0

Media device information

driver tegra194-vi5
model NVIDIA Tegra Video Input Device
serial
bus info
hw revision 0x3
driver version 0.0.0

Device topology

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

  • entity 4: 15a00000.nvcsi–1 (2 pads, 2 links)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev1
    pad0: Sink
    <- “imx390 0-001a”:0 [ENABLED]
    pad1: Source
    -> “vi-output, imx390 0-001a”:0 [ENABLED]

  • entity 7: imx390 0-001a (1 pad, 1 link)
    type V4L2 subdev subtype Sensor flags 0
    device node name /dev/v4l-subdev2
    pad0: Source
    [fmt:SRGGB12_1X12/1936x1100 field:none colorspace:srgb]
    -> “15a00000.nvcsi–1”:0 [ENABLED]

  • entity 9: vi-output, imx390 0-001a (1 pad, 1 link)
    type Node subtype V4L flags 0
    device node name /dev/video0
    pad0: Sink
    <- “15a00000.nvcsi–1”:1 [ENABLED]

nvidia@nvidia-desktop:~$ sudo v4l2-ctl -DT --list-formats-ext --device=/dev/video0
[sudo] password for nvidia:
Driver Info (not using libv4l2):
Driver name : tegra-video
Card type : vi-output, imx390 0-001a
Bus info : platform:15c10000.vi:2
Driver version: 4.9.140
Capabilities : 0x84200001
Video Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04200001
Video Capture
Streaming
Extended Pix Format
VIDIOC_G_TUNER: failed: Inappropriate ioctl for device
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: ‘RG10’
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 1936x1100
Interval: Discrete 0.033s (30.000 fps)
Bestregards

By the way ,this code was successfully on nano R32.2.1. I made a corresponding adaptation to nx R32.4.2

hello infovlpwm,

please check Camera Modules and the Device Tree and review your sensor device tree settings, especially the sensor pixel clock.
please refer to Sensor Pixel Clock session and double check the property setting.
thanks

Hi
I use the command v4l2-ctl -d /dev/video0 --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100
The command keeps blocking…
here are log:

20200514.log (24.6 KB)

Hi
i use the csi signal
CSI2_CLK_N 28
CSI2_CLK_P 30
CSI2_D0_N 22
CSI2_D0_P 24
CSI2_D1_N 34
CSI2_D1_P 36
CSI3_CLK_N 27
CSI3_CLK_P 29
CSI3_D0_N 21
CSI3_D0_P 23
CSI3_D1_N 33
CSI3_D1_P 35
in the DT ,port-index=<2>,

host1x {
vi@15c10000 {
num-channels = <2>;
vi_port1: port@1 {
reg = <1>;
liimx390_vi_in1: endpoint {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&liimx390_csi_out1>;
};
};

nvcsi@15a00000 {
num-channels = <2>;
#address-cells = <1>;
#size-cells = <0>;
csi_chan1: channel@1 {
reg = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
csi_chan1_port0: port@0 {
reg = <0>;
liimx390_csi_in1: endpoint@2 {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&liimx390_imx390_out1>;
};
};
csi_chan1_port1: port@1 {
reg = <1>;
liimx390_csi_out1: endpoint@3 {
remote-endpoint = <&liimx390_vi_in1>;
};
};
};
};

cam_module1: module1 {
badge = “jakku_rear_liimx390”;
position = “rear”;
orientation = “1”;
cam_module1_drivernode0: drivernode0 {
/* Declare PCL support driver (classically known as guid) /
pcl_id = “v4l2_sensor”;
/
Driver v4l2 device name /
devname = “imx390 0-001a”;
/
Declare the device-tree hierarchy to driver instance */
proc-device-tree = “/proc/device-tree/i2c@3160000/imx390_a@1a”;
};
};
<
I think there is no problem in DT.

hello infovlpwm,

you still got i2c no ack failures.
could you please confirm you had enable clocks correctly.
thanks

[  479.316472] tegra-i2c 3160000.i2c: no acknowledge from address 0x1a
[  479.342830] video0: VIDIOC_STREAMON: type=vid-cap
[  480.202849] tegra194-vi5 15c10000.vi: no reply from camera processor
[  480.203001] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms

BTW,
may I know how many camera sensors in your environment setups, did you mount two cameras?

vi@15c10000 {
num-channels = <2>;

Hi
I mount two camera,first is orignal source imx219,
That no ack is normal, the program will first access the default camera address which is not the actual address of the camera

hello infovlpwm,

that no ack looks abnormal since VI also communicate with sensor via 0x1a;
please refer to documentation for Port Bindings.

did you setup an I2C multiplexer to register your camera sensor?

Hi
I confirm that both the hardware clock and the i2c signal are working normally. Please check whether there are any errors in my DTS.
dts.log (22.2 KB)

Here are signal that i used :
CSI2_CLK_N 28
CSI2_CLK_P 30
CSI2_D0_N 22
CSI2_D0_P 24
CSI2_D1_N 34
CSI2_D1_P 36
CSI3_CLK_N 27
CSI3_CLK_P 29
CSI3_D0_N 21
CSI3_D0_P 23
CSI3_D1_N 33
CSI3_D1_P 35

i2c pin232 pin 234
I

hello infovlpwm,

may I know had you disconnect the default (imx219) camera sensor for testing imx390?

please also access Jetson Nano Product Design Guide via download center;
according to product design guide, you had connect imx390 to module pin csi-2/csi-3, its signaling should be csi-e/csi-f;
hence the port binding in the DT should be specify as port-index = <4>;
please have a try with above configurations,
thanks

Hello JerryChang
Now I want to migrate to NX. The NX pinmux table shows that pin corresponds to csi_c/csi_d. Doesn’t the corresponding is port-index=<2>?.camera is 4lane mode.

Hi
Board at the same time access imx219 imx390, imx219 can work normally.Imx219 was not connected when testing imx390

hello infovlpwm,

FYI,
please access Jetson Xavier NX Product Design Guide from download center.
you may check [Figure 7-2. CSI Connection Options], in the 4-lane mode only csi-2 clocks were used.

since v4l2 standard controls recognize the devices.

$ sudo v4l2-ctl -DT --list-formats-ext --device=/dev/video0
...
Pixel Format: ‘RG10’
Name : 10-bit Bayer RGRG/GBGB
Size: Discrete 1936x1100

please enable sensor streaming with above format report accordingly.

$ v4l2-ctl -d /dev/video0 --set-fmt-video=width=1936,height=1100,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100

Hi infovlpwm
I use the command v4l2-ctl -d /dev/video0 --set-fmt-video=width=1936,height=1100,pixelformat=RG10 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=100.

The command has been blocked since execution, ,here are dmesg error
[ 94.296876] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 94.297038] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 94.297203] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 94.299057] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 96.855802] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 96.855971] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 96.856127] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 96.856291] tegra194-vi5 15c10000.vi: unexpected response from camera processor
[ 96.856434] video4linux video0: vi capture release failed
[ 96.856543] tegra194-vi5 15c10000.vi: fatal: error recovery failed

Where should I solve the problem?
Best regards!