V4l2-ctl can't capture video data

Hi Jerry,

Currently, I have 2 IMX490(x4) cameras attached to MAX9296A through 2 MAX9295A. The 9296A’s port A finally connect to Orin’s CSI4/5 using x4 lanes.

I think GMSL_CSI_PORT_A~GMSL_CSI_PORT_F here refer to the CSI port number in the Deserializer(though MAX9296A only support 2 CSI ports, it seems the SDK used a common Deserializer driver)?

Thanks!

serdes-csi-link is set by vc-id in driver. please give it a try to update dst-csi-port mapping to CSI-E.

Hi Jerry,

I have a quick try by updating dst-csi-port mapping to CSI-E, but the camera driver would report error when starting streaming.

v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=5
[ 123.292451] bwmgr API not supported
[ 123.847777] max9296 34-0048: max9296_get_available_pipe: all pipes are busy
[ 123.854979] imx390 34-001b: imx390_start_streaming: error setting stream
[ 123.861914] imx390 34-001b: Error turning on streaming
[ 125.795777] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 125.804934] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 125.815808] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 125.823546] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=4, csi_port=4
[ 125.834243] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 125.841971] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 4 vc- 0
[ 125.852727] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

I had a search online about the max9296 CSI port E and found that it’s used to specify the max9296 CSI port in 4x2 mode. In our configuration, we use the max9296 2x4 mode, so I think the dst-csi-port in our configure should be CSI-A.

BTW, I found a similar issue that was reported in the community and @ShanCCC mentioned it could be the MAX9296 configure cause the problem. Do you have any detail information about which max9296 configure that I need to double check?

Thanks

Hi Jerry,

After our HW engineer double confirm with camera vendor, we found that the MAX9296 CSI port A lane mapping configuration was incorrect. After changing the MAX9296 CSI port A PHY lane map register(0x333) to 0x4E, the err_intr_stat_ph_ecc_multi_bit_err disappeared, but the v4l2-ctl still can’t capture video data. New error messages:

v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=5
[ 102.093554] bwmgr API not supported
[ 102.889515] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[ 102.922781] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[ 102.956133] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512
[ 102.989349] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 512

and the kernel trace log:

cat /sys/kernel/debug/tracing/trace
# tracer: nop
#
# entries-in-buffer/entries-written: 211/211 #P:8
#
# _-----=> irqs-off
# / _----=> need-resched
# | / _—=> hardirq/softirq
# || / _–=> preempt-depth
# ||| / delay
# TASK-PID CPU# |||| TIMESTAMP FUNCTION
# | | | |||| | |
kworker/0:4-179 [000] … 232.597854: rtcpu_string: tstamp:8059626625 id:0x04010000 str:“VM0 deactivating.”
v4l2-ctl-2612 [007] … 237.838348: tegra_channel_open: vi-output, imx390 34-001b
v4l2-ctl-2612 [007] … 237.857225: tegra_channel_set_power: imx390 34-001b : 0x1
v4l2-ctl-2612 [007] … 237.857244: camera_common_s_power: status : 0x1
v4l2-ctl-2612 [007] … 237.857279: tegra_channel_set_power: 13e40000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-2612 [007] … 237.857283: csi_s_power: enable : 0x1
v4l2-ctl-2612 [007] … 237.857425: tegra_channel_capture_setup: vnc_id 0 W 2880 H 1860 fmt c4
kworker/0:4-179 [000] … 237.861692: rtcpu_string: tstamp:8224568451 id:0x04010000 str:“VM0 activating.”
v4l2-ctl-2612 [007] … 237.866547: tegra_channel_set_stream: enable : 0x1
v4l2-ctl-2612 [007] … 237.880653: tegra_channel_set_stream: 13e40000.host1x:nvcsi@15a00000- : 0x1
v4l2-ctl-2612 [007] … 237.880656: csi_s_stream: enable : 0x1
v4l2-ctl-2612 [007] … 237.880965: tegra_channel_set_stream: imx390 34-001b : 0x1
kworker/0:4-179 [000] … 237.917670: rtcpu_vinotify_event: tstamp:8225232001 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:263192599200 data:0x379d580010000000
kworker/0:4-179 [000] … 237.917671: rtcpu_vinotify_event: tstamp:8225232159 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:263192605632 data:0x0000000031000001
kworker/0:4-179 [000] … 237.917671: rtcpu_vinotify_event: tstamp:8225232311 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:263192666272 data:0x379d550010000000
kworker/0:4-179 [000] … 237.917671: rtcpu_vinotify_event: tstamp:8225232447 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:263192672800 data:0x0000000031000002
kworker/0:4-179 [000] … 238.309656: rtcpu_vinotify_event: tstamp:8237710995 cch:0 vi:0 tag:FS channel:0x00 frame:0 vi_tstamp:263598495552 data:0x0000000000000014
kworker/0:4-179 [000] … 238.309657: rtcpu_vinotify_event: tstamp:8237711132 cch:0 vi:0 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:263598495648 data:0x0000000800000000
kworker/0:4-179 [000] … 238.309657: rtcpu_vinotify_event: tstamp:8237711283 cch:0 vi:0 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:263598512320 data:0x0000000000000001
kworker/0:4-179 [000] … 238.309657: rtcpu_vinotify_event: tstamp:8237711412 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:263598539200 data:0x0000000008020001
kworker/0:4-179 [000] … 238.309657: rtcpu_vinotify_event: tstamp:8237711560 cch:0 vi:0 tag:CHANSEL_FAULT channel:0x23 frame:0 vi_tstamp:263598518336 data:0x0000000000000200
kworker/0:4-179 [000] … 238.309658: rtcpu_vinotify_event: tstamp:8237711687 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:263598617088 data:0x0000000001020001
kworker/0:4-179 [000] … 238.309658: rtcpu_vinotify_event: tstamp:8238446782 cch:0 vi:0 tag:FE channel:0x00 frame:0 vi_tstamp:263628085312 data:0x0000000000000024
kworker/0:4-179 [000] … 238.309658: rtcpu_vinotify_event: tstamp:8238446914 cch:0 vi:0 tag:CHANSEL_SHORT_FRAME channel:0x10 frame:0 vi_tstamp:263628085344 data:0x06ef200001000000
kworker/0:4-179 [000] … 238.309658: rtcpu_vinotify_event: tstamp:8238447066 cch:0 vi:0 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:263628085440 data:0x0000000800000000
kworker/0:4-179 [000] … 238.309658: rtcpu_vinotify_event: tstamp:8238447197 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:263628241024 data:0x379d580010000000
kworker/0:4-179 [000] … 238.309658: rtcpu_vinotify_event: tstamp:8238447346 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:263628284384 data:0x0000000031000003
kworker/0:4-179 [000] … 238.309659: rtcpu_vinotify_event: tstamp:8238447474 cch:0 vi:0 tag:FS channel:0x00 frame:0 vi_tstamp:263630180192 data:0x0000000000000014
kworker/0:4-179 [000] … 238.365666: rtcpu_vinotify_event: tstamp:8238958963 cch:0 vi:0 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:263630180288 data:0x0000000800000000
kworker/0:4-179 [000] … 238.365667: rtcpu_vinotify_event: tstamp:8238959099 cch:0 vi:0 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:263630428736 data:0x0000000000000001
kworker/0:4-179 [000] … 238.365668: rtcpu_vinotify_event: tstamp:8238959249 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:263630439616 data:0x0000000008020002
kworker/0:4-179 [000] … 238.365668: rtcpu_vinotify_event: tstamp:8238959379 cch:0 vi:0 tag:CHANSEL_FAULT channel:0x23 frame:0 vi_tstamp:263630434688 data:0x0000000000000200
kworker/0:4-179 [000] … 238.365668: rtcpu_vinotify_event: tstamp:8238959528 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:263630519744 data:0x0000000001020002
kworker/0:4-179 [000] … 238.365669: rtcpu_vinotify_event: tstamp:8239501248 cch:0 vi:0 tag:CHANSEL_FAULT channel:0x23 frame:0 vi_tstamp:263661417888 data:0x0000000007430202
kworker/0:4-179 [000] … 238.365669: rtcpu_vinotify_event: tstamp:8239501401 cch:0 vi:0 tag:FE channel:0x00 frame:0 vi_tstamp:263661418464 data:0x0000000000000024
kworker/0:4-179 [000] … 238.365670: rtcpu_vinotify_event: tstamp:8239501537 cch:0 vi:0 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:263661418560 data:0x0000000800000000
kworker/0:4-179 [000] … 238.365670: rtcpu_vinotify_event: tstamp:8239501690 cch:0 vi:0 tag:ATOMP_FRAME_DONE channel:0x23 frame:0 vi_tstamp:263661418784 data:0x0000000000000000
kworker/0:4-179 [000] … 238.365670: rtcpu_vinotify_event: tstamp:8239501818 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:263661583872 data:0x379d550010000000
kworker/0:4-179 [000] … 238.365671: rtcpu_vinotify_event: tstamp:8239501966 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:263661627232 data:0x0000000031000004
kworker/0:4-179 [000] … 238.365671: rtcpu_vinotify_event: tstamp:8239502093 cch:0 vi:0 tag:FS channel:0x00 frame:0 vi_tstamp:263663513344 data:0x0000000000000014
kworker/0:4-179 [000] … 238.365671: rtcpu_vinotify_event: tstamp:8239502242 cch:0 vi:0 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:263663513440 data:0x0000000800000000
kworker/0:4-179 [000] … 238.365672: rtcpu_vinotify_event: tstamp:8239502369 cch:0 vi:0 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:263663761856 data:0x0000000000000001
kworker/0:4-179 [000] … 238.365672: rtcpu_vinotify_event: tstamp:8239502517 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:263663772704 data:0x0000000008020003
kworker/0:4-179 [000] … 238.365673: rtcpu_vinotify_event: tstamp:8239502644 cch:0 vi:0 tag:CHANSEL_FAULT channel:0x23 frame:0 vi_tstamp:263663767840 data:0x0000000000000200
kworker/0:4-179 [000] … 238.365673: rtcpu_vinotify_event: tstamp:8239989963 cch:0 vi:0 tag:VIFALC_ACTIONLST channel:0x23 frame:0 vi_tstamp:263663861024 data:0x0000000001020003
kworker/0:4-179 [000] … 238.421660: rtcpu_vinotify_event: tstamp:8240531889 cch:0 vi:0 tag:CHANSEL_FAULT channel:0x23 frame:0 vi_tstamp:263694750912 data:0x0000000007430202
kworker/0:4-179 [000] … 238.421661: rtcpu_vinotify_event: tstamp:8240532044 cch:0 vi:0 tag:FE channel:0x00 frame:0 vi_tstamp:263694751456 data:0x0000000000000024
kworker/0:4-179 [000] … 238.421661: rtcpu_vinotify_event: tstamp:8240532177 cch:0 vi:0 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:263694751552 data:0x0000000800000000
kworker/0:4-179 [000] … 238.421661: rtcpu_vinotify_event: tstamp:8240532328 cch:0 vi:0 tag:ATOMP_FRAME_DONE channel:0x23 frame:0 vi_tstamp:263694751744 data:0x0000000000000000
kworker/0:4-179 [000] … 238.421662: rtcpu_vinotify_event: tstamp:8240532457 cch:0 vi:0 tag:FS channel:0x00 frame:0 vi_tstamp:263696846464 data:0x0000000000000014

Could you help have a look and give us some debug direction?

Thanks!

The trace log show the CHANSEL_FAULT and the error bit tell the PIXEL_SHORT_LINE that could be VI receive less pixel as expect.

https://elinux.org/Jetson/l4t/Camera_BringUp

CHANSEL_FAULT channel:0x23 frame:0 vi_tstamp:263661417888 data:0x0000000007430202

Hi ShaneCCC,

Thanks for your reply!

What may be the reason that VI receive less pixel as expect? Which configure should I check and tune for this issue?

Thanks!

It could be the sensor output size less than dts report cause the short line error.

Thanks

I got the following camera resolution and line_length data from Vendor,

dynamic_pixel_bit_depth = “12”;
csi_pixel_bit_depth = “12”;
mode_type = “bayer”;
pixel_phase = “rggb”;
active_w = “2880”;
active_h = “1860”;
line_length = “3160”;
pix_clk_hz = “189600000”;
serdes_pix_clk_hz = “466666660”;

and the MAX9296 port A PHY clock was set to 1400MHz. Any parameters looks wrong?

Thanks.

You can modify the sensor driver to report less width and modify the active_w to narrow down it.

You need to confirm the modification by v4l2-ctl --list-formats-ext

You mean change the following driver data?

static const struct camera_common_frmfmt imx490_frmfmt = {
{{2880, 1860}, imx490_30fps, 1, 0, IMX490_MODE_2880X1860_CROP_30FPS},
};

and modify the active_w to narrow down it.

modify active_w in the dts?

Thanks!

Yes you can reduce report less than 2880 to try.

Hi ShaneCCC,

Thanks for the suggestion!

After modifying the sensor driver to report 2800 width and setting the active_w to 2800 in dts, the v4l2-ctl can capture the vedeo data now.

v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: ‘RG12’ (12-bit Bayer RGRG/GBGB)
Size: Discrete 2800x1860
Interval: Discrete 0.033s (30.000 fps)

v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap
[ 131.610223] bwmgr API not supported
[ 132.438661] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps

But it still reports an error for the first frame. When I try to enable the trace for more information, the system crashed with lots of kernel panic log.

*** DATA ABORT EXCEPTION ***
R0:     15c00000        R1:     00001814        R2:     00008010        R3:     00000002
R4:     0bcd8428        R5:     00000000        R6:     00000000        R7:     799e3300
R8:     0bcc9fb0        R9:     0bcc9fb2        R10:    0bcc9fa8        R11:    00000550
R12:    00007b90        SP:     0bcc9f68        LR:     0bcac5e4        PC:     0bcac600
SPSR:   6000011f
DFSR:   00001008        DFAR:   15c01814        ADFSR:  00500000
IFSR:   00000000        IFAR:   00000000        AIFSR:  00000000
⚌⚌[  294.692395] CPU:0, Error:rce-fabric@0xbe00000, irq=25
[  294.697661] **************************************
[  294.702596] CPU:0, Error:rce-fabric, Errmon:2
[  294.707080] CBB registers returning all 1's which is invalid
[  294.712946] CPU:0, Error:cbb-fabric@0x13a00000, irq=21
[  294.718229] **************************************
[  294.723155] CPU:0, Error:cbb-fabric, Errmon:2
[  294.723168]    Error Code            : FIREWALL_ERR
[  294.723174]    Overflow              : Multiple FIREWALL_ERR
[  294.731784]
[  294.731786]    Error Code            : FIREWALL_ERR
[  294.731792]    MASTER_ID             : CCPLEX
[  294.731794]    Address               : 0xbe12208
[  294.731802]    Cache                 : 0x1 -- Bufferable
[  294.738072]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[  294.745686]    Access_Type           : Read
[  294.745688]    Access_ID             : 0x14
[  294.745690]    Fabric                : cbb-fabric
[  294.745692]    Slave_Id              : 0x0
[  294.745694]    Burst_length          : 0x0
[  294.745696]    Burst_type            : 0x1
[  294.745704]    Beat_size             : 0x2
[  294.753584]    VQC                   : 0x0
[  294.753586]    GRPSEC                : 0x7e
[  294.753591]    FALCONSEC             : 0x0
[  294.753597]    Slave                 : T234_CBB_SN_AON_SLAVE
[  294.764056]  **************************************
[  294.771015] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:521 tegra234_cbb_err_isr+0x128/0x170
[  294.813799] ---[ end trace 0b6ef22f469496cd ]---
[  294.818565] CPU:0, Error:rce-fabric@0xbe00000, irq=25
[  294.823774] **************************************
[  294.828691] CPU:0, Error:rce-fabric, Errmon:2
[  294.833174] CBB registers returning all 1's which is invalid
[  294.839019] CPU:0, Error:cbb-fabric@0x13a00000, irq=21
[  294.844304] **************************************
[  294.849238] CPU:0, Error:cbb-fabric, Errmon:2
[  294.853719]    Error Code            : FIREWALL_ERR
[  294.857838]    Overflow              : Multiple FIREWALL_ERR
[  294.862584]
[  294.864123]    Error Code            : FIREWALL_ERR
[  294.868240]    MASTER_ID             : CCPLEX
[  294.871731]    Address               : 0xbe12208
[  294.875317]    Cache                 : 0x1 -- Bufferable
[  294.879609]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[  294.886579]    Access_Type           : Read
[  294.890070]    Access_ID             : 0x11
[  294.890072]    Fabric                : cbb-fabric
[  294.896984]    Slave_Id              : 0x0
[  294.900127]    Burst_length          : 0x0
[  294.903618]    Burst_type            : 0x1
[  294.906936]    Beat_size             : 0x2
[  294.910166]    VQC                   : 0x0
[  294.912955]    GRPSEC                : 0x7e
[  294.916011]    FALCONSEC             : 0x0
[  294.919242]    Slave                 : T234_CBB_SN_AON_SLAVE
[  294.923820]  **************************************
[  294.928882] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:521 tegra234_cbb_err_isr+0x128/0x170
[  294.939606] ---[ end trace 0b6ef22f469496ce ]---
[  294.944358] CPU:0, Error:rce-fabric@0xbe00000, irq=25
[  294.949567] **************************************
[  294.954504] CPU:0, Error:rce-fabric, Errmon:2
[  294.958998] CBB registers returning all 1's which is invalid
[  294.964872] CPU:0, Error:cbb-fabric@0x13a00000, irq=21
[  294.970163] **************************************
[  294.975099] CPU:0, Error:cbb-fabric, Errmon:2
[  294.979591]    Error Code            : FIREWALL_ERR
[  294.983716]    Overflow              : Multiple FIREWALL_ERR
[  294.988472]
[  294.990012]    Error Code            : FIREWALL_ERR
[  294.994147]    MASTER_ID             : CCPLEX
[  294.997657]    Address               : 0xbe12208
[  295.001256]    Cache                 : 0x1 -- Bufferable
[  295.005566]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[  295.012552]    Access_Type           : Read
[  295.016056]    Access_ID             : 0x17
[  295.016058]    Fabric                : cbb-fabric
[  295.022971]    Slave_Id              : 0x0
[  295.026121]    Burst_length          : 0x0
[  295.029626]    Burst_type            : 0x1
[  295.032957]    Beat_size             : 0x2
[  295.036193]    VQC                   : 0x0
[  295.038998]    GRPSEC                : 0x7e
[  295.042061]    FALCONSEC             : 0x0
[  295.045293]    Slave                 : T234_CBB_SN_AON_SLAVE
[  295.049870]  **************************************
[  295.054918] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:521 tegra234_cbb_err_isr+0x128/0x170
[  295.065628] ---[ end trace 0b6ef22f469496cf ]---
[  295.070389] CPU:0, Error:rce-fabric@0xbe00000, irq=25
[  295.075592] **************************************
[  295.080533] CPU:0, Error:rce-fabric, Errmon:2
[  295.085027] CBB registers returning all 1's which is invalid
[  295.090916] CPU:0, Error:cbb-fabric@0x13a00000, irq=21
[  295.096205] **************************************
[  295.101133] CPU:0, Error:cbb-fabric, Errmon:2
[  295.105619]    Error Code            : FIREWALL_ERR
[  295.109752]    Overflow              : Multiple FIREWALL_ERR
[  295.114504]
[  295.116041]    Error Code            : FIREWALL_ERR
[  295.120177]    MASTER_ID             : CCPLEX
[  295.123678]    Address               : 0xbe12208
[  295.127275]    Cache                 : 0x1 -- Bufferable
[  295.131577]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[  295.138561]    Access_Type           : Read
[  295.142067]    Access_ID             : 0x11
[  295.142069]    Fabric                : cbb-fabric
[  295.148990]    Slave_Id              : 0x0
[  295.152139]    Burst_length          : 0x0
[  295.155638]    Burst_type            : 0x1
[  295.158963]    Beat_size             : 0x2
[  295.162194]    VQC                   : 0x0
[  295.164981]    GRPSEC                : 0x7e
[  295.168036]    FALCONSEC             : 0x0
[  295.171273]    Slave                 : T234_CBB_SN_AON_SLAVE
[  295.175851]  **************************************
[  295.180899] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:521 tegra234_cbb_err_isr+0x128/0x170
[  295.191597] ---[ end trace 0b6ef22f469496d0 ]---
[  295.196352] CPU:0, Error:rce-fabric@0xbe00000, irq=25
[  295.201551] **************************************
[  295.206487] CPU:0, Error:rce-fabric, Errmon:2
[  295.210972] CBB registers returning all 1's which is invalid
[  295.216836] CPU:0, Error:rce-fabric@0xbe00000, irq=25
[  295.222040] **************************************
[  295.226977] CPU:0, Error:rce-fabric, Errmon:2
[  295.231469] CBB registers returning all 1's which is invalid
[  295.237303] CPU:0, Error:cbb-fabric@0x13a00000, irq=21
[  295.242585] **************************************
[  295.247521] CPU:0, Error:cbb-fabric, Errmon:2
[  295.252015]    Error Code            : FIREWALL_ERR
[  295.256140]    Overflow              : Multiple FIREWALL_ERR
[  295.260904]
[  295.262439]    Error Code            : FIREWALL_ERR
[  295.266571]    MASTER_ID             : CCPLEX
[  295.270074]    Address               : 0xbe12208
[  295.273673]    Cache                 : 0x1 -- Bufferable
[  295.277983]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[  295.284964]    Access_Type           : Read
[  295.288468]    Access_ID             : 0x10
[  295.288470]    Fabric                : cbb-fabric
[  295.295386]    Slave_Id              : 0x0
[  295.298531]    Burst_length          : 0x0
[  295.302029]    Burst_type            : 0x1
[  295.305356]    Beat_size             : 0x2
[  295.308593]    VQC                   : 0x0
[  295.311382]    GRPSEC                : 0x7e
[  295.314445]    FALCONSEC             : 0x0
[  295.317679]    Slave                 : T234_CBB_SN_AON_SLAVE
[  295.322255]  **************************************
[  295.327291] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:521 tegra234_cbb_err_isr+0x128/0x170
[  295.337974] ---[ end trace 0b6ef22f469496d1 ]---
[  295.342760] CPU:0, Error:rce-fabric@0xbe00000, irq=25
[  295.347974] **************************************
[  295.352904] CPU:0, Error:rce-fabric, Errmon:2
[  295.357396] CBB registers returning all 1's which is invalid
[  295.363245] CPU:0, Error:cbb-fabric@0x13a00000, irq=21
[  295.368536] **************************************
[  295.373466] CPU:0, Error:cbb-fabric, Errmon:2
[  295.377961]    Error Code            : FIREWALL_ERR
[  295.382100]    Overflow              : Multiple FIREWALL_ERR
[  295.386863]
[  295.388401]    Error Code            : FIREWALL_ERR
[  295.392535]    MASTER_ID             : CCPLEX
[  295.396038]    Address               : 0xbe12208
[  295.399636]    Cache                 : 0x1 -- Bufferable
[  295.403949]    Protection            : 0x2 -- Unprivileged, Non-Secure, Data Access
[  295.410937]    Access_Type           : Read
[  295.414441]    Access_ID             : 0x17
[  295.414443]    Fabric                : cbb-fabric
[  295.421368]    Slave_Id              : 0x0
[  295.424516]    Burst_length          : 0x0
[  295.428022]    Burst_type            : 0x1
[  295.431347]    Beat_size             : 0x2
[  295.434584]    VQC                   : 0x0
[  295.437372]    GRPSEC                : 0x7e
[  295.440436]    FALCONSEC             : 0x0
[  295.443668]    Slave                 : T234_CBB_SN_AON_SLAVE
[  295.448248]  **************************************
[  295.453287] WARNING: CPU: 0 PID: 0 at drivers/soc/tegra/cbb/tegra234-cbb.c:521 tegra234_cbb_err_isr+0x128/0x170
[  295.463985] ---[ end trace 0b6ef22f469496d2 ]---

For the camera resolution parameters, shall I just change it to 2800*1860 in the camera driver as well as related dts files? Or any parameters that should be tuned for the next step?

Thanks.

Could you verify by argus_camera or gstreamer of nvarguscamerasrc to check the first frame error.

You mean using nvargus_nvraw command?

Thanks!

No, but nvargus_nvraw should be fine too.

Hi ShaneCCC,

I tried the gst-launch-1.0 nvarguscamerasrc command to capture the video, but error was reported.

nvidia@ubuntu:~$ gst-launch-1.0 nvarguscamerasrc num-buffers=200 ! ‘video/x-raw(memory:NVMM), width=2800, height=1860, framerate=30/1, format=NV12’ ! nvv4l2h264enc ! h264parse ! qtmux ! filesink location=test.mp4 -e
No protocol specified
No protocol specified
No protocol specified
No protocol specified
nvbuf_utils: Could not get EGL display connection
No protocol specified
No protocol specified
No protocol specified
No protocol specified
nvbufsurftransform: Could not get EGL display connection
Setting pipeline to PAUSED …
Opening in BLOCKING MODE
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
Redistribute latency…
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
Got EOS from element “pipeline0”.
Execution ended after 0:00:00.006189427
Setting pipeline to NULL …
Freeing pipeline …

I also tried the nvargus_nvraw command and it show no camera was available:

nvidia@ubuntu:~$ nvargus_nvraw --lps
No protocol specified
No protocol specified
No protocol specified
No protocol specified
nvbuf_utils: Could not get EGL display connection
nvargus_nvraw version 1.13.1
Number of supported sensor entries 0
Entry Source Mode Uniquename Resolution FR BitDepth Mode
Index Index Index

But there are 2 cameras in the system

nvidia@ubuntu:~$ ls /dev/video*
/dev/video0 /dev/video1
nvidia@ubuntu:~$ v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture
[0]: ‘RG12’ (12-bit Bayer RGRG/GBGB)
Size: Discrete 2800x1860
Interval: Discrete 0.033s (30.000 fps)
nvidia@ubuntu:~$

From the log tell your device tree context of tegra_camera_platform{} have problem detect sensors for nvarguscamerasrc.

nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 No cameras available

Hi ShaneCCC,

I think you mean the device tree node tegra-camera-platform was not properly configured.
Here are the context of this node in the board dts file and currently we only enabled module8 and module 9. Could you help have a look?

tegra-camera-platform {                                                                                                                                           
     compatible = "nvidia, tegra-camera-platform";                                                                                                                 
     num_csi_lanes = <0x04>;                                                                                                                                       
     max_lane_speed = <0x3d0900>;                                                                                                                                  
     min_bits_per_pixel = <0x0a>;                                                                                                                                  
     vi_peak_byte_per_pixel = <0x02>;                                                                                                                              
     vi_bw_margin_pct = <0x19>;                                                                                                                                    
     isp_peak_byte_per_pixel = <0x05>;                                                                                                                             
     isp_bw_margin_pct = <0x19>;                                                                                                                                   
     tpg_max_iso = <0x3bc400>;                                                                                                                                     
     phandle = <0x4e8>;                                                                                                                                            
                                                                                                                                                                   
     modules {                                                                                                                                                     
         module0 {                                                                                                                                                 
             status = "disabled";                                                                                                                                  
             badge = "imx490_rear";                                                                                                                                
             position = "rear";                                                                                                                                    
             orientation = [31 00];                                                                                                                                
             phandle = <0x4e9>;                                                                                                                                                                                                                                                                                                       
             drivernode0 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_sensor";                                                                                                                           
                 devname = "imx490 30-001b";                                                                                                                       
                 proc-device-tree = "/proc/device-tree/i2c@3160000/pca9547@70/i2c@0/imx490_a@1b";                                                                  
                 phandle = <0x4ea>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                 
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x4eb>;                                                                                                                                
             };                                                                                                                                                    
         };

         module1 {                                                                                                                                                 
             status = "disabled";                                                                                                                                  
             badge = "imx490_front";                                                                                                                               
             position = "front";                                                                                                                                   
             orientation = [31 00];                                                                                                                                
             phandle = <0x4ec>;                                                                                                                                                                                                                                                                                                       
             drivernode0 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_sensor";                                                                                                                           
                 devname = "imx490 30-001c";                                                                                                                       
                 proc-device-tree = "/proc/device-tree/i2c@3160000/pca9547@70/i2c@0/imx490_b@1c";                                                                  
                 phandle = <0x4ed>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                      
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x4ee>;                                                                                                                                
             };                                                                                                                                                    
         };

         module2 {                                                                                                                                                 
             status = "disabled";                                                                                                                                  
             phandle = <0x4f5>;                                                                                                                                                                                                                                                                                                     
             drivernode0 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 phandle = <0x4f6>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                    
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x4f7>;                                                                                                                                
             };                                                                                                                                                    
         };                                                                                                                                                        
                                                                                                                                                                   
         module3 {                                                                                                                                                 
             status = "disabled";                                                                                                                                  
             phandle = <0x4f8>;                                                                                                                                                                                                                                                                                                      
             drivernode0 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 phandle = <0x4f9>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                   
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x4fa>;                                                                                                                                
             };                                                                                                                                                    
         };

         module4 {                                                                                                                                                 
             status = "disabled";                                                                                                                                  
             phandle = <0x4fb>;                                                                                                                                                                                                                                                                                                   
             drivernode0 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 phandle = <0x4fc>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                       
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x4fd>;                                                                                                                                
             };                                                                                                                                                    
         };                                                                                                                                                                                                                                                                                                                          
         
         module5 {                                                                                                                                                 
             status = "disabled";                                                                                                                                  
             phandle = <0x4fe>;                                                                                                                                                                                                                                                                                                     
             drivernode0 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 phandle = <0x4ff>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                     
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x500>;                                                                                                                                
             };                                                                                                                                                    
         };

         module6 {                                                                                                                                                 
             status = "disabled";                                                                                                                                  
             phandle = <0x501>;                                                                                                                                                                                                                                                                                                       
             drivernode0 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 phandle = <0x502>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                       
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x503>;                                                                                                                                
             };                                                                                                                                                    
         };                                                                                                                                                        
                                                                                                                                                                   
         module7 {                                                                                                                                                 
             status = "disabled";                                                                                                                                  
             phandle = <0x504>;                                                                                                                                                                                                                                                                                                      
             drivernode0 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 phandle = <0x505>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                     
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x506>;                                                                                                                                
             };                                                                                                                                                    
         };

         module8 {                                                                                                                                                 
             badge = "imx490_rear";                                                                                                                                
             position = "rear";                                                                                                                                    
             orientation = [31 00];                                                                                                                                
             status = "okay";                                                                                                                                      
             phandle = <0x4ef>;                                                                                                                                                                                                                                                                                                      
             drivernode0 {                                                                                                                                         
                 pcl_id = "v4l2_sensor";                                                                                                                           
                 devname = "imx490 34-001b";                                                                                                                       
                 proc-device-tree = "/proc/device-tree/i2c@3160000/pca9547@70/i2c@4/imx490_a@1b";                                                                  
                 status = "okay";                                                                                                                                  
                 phandle = <0x4f0>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                      
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x4f1>;                                                                                                                                
             };                                                                                                                                                    
         };

         module9 {                                                                                                                                                 
             badge = "imx490_front";                                                                                                                               
             position = "front";                                                                                                                                   
             orientation = [31 00];                                                                                                                                
             status = "okay";                                                                                                                                      
             phandle = <0x4f2>;                                                                                                                                                                                                                                                                                                       
             drivernode0 {                                                                                                                                         
                 pcl_id = "v4l2_sensor";                                                                                                                           
                 devname = "imx490 34-001c";                                                                                                                       
                 proc-device-tree = "/proc/device-tree/i2c@3160000/pca9547@70/i2c@4/imx490_b@1c";                                                                  
                 status = "okay";                                                                                                                                  
                 phandle = <0x4f3>;                                                                                                                                
             };                                                                                                                                                                                                                                                                                                                      
             drivernode1 {                                                                                                                                         
                 status = "disabled";                                                                                                                              
                 pcl_id = "v4l2_lens";                                                                                                                             
                 phandle = <0x4f4>;                                                                                                                                
             };                                                                                                                                                    
         };                                                                                                                                                        
     };                                                                                                                                                            
 };

Confirm the devname and proc-device.
v4l2-ctl --list-devices able to show the name and address

                 devname = "imx490 30-001b";                                                                                                                       
                 proc-device-tree = "/proc/device-tree/i2c@3160000/pca9547@70/i2c@0/imx490_a@1b";                                                                  

Hi ShaneCCC,

Finally, I was able to capture the video with the below command, but I don’t know how to check the impact of the first frame error.

gst-launch-1.0 --gst-debug=4 nvarguscamerasrc sensor-id=1 ! ‘video/xraw(memory:NVMM),width=2800,height=1860,framerate=30/1,format=NV12’ ! nvvidconv ! fpsdisplaysink video-sink=xvimagesink sync=false

  1. image captured during night

  2. image captured during midday

Thanks!