This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62P: SOC-side MIPI Bandwidth Consultation

Part Number: AM62P

Hi,

Currently, I am adapting the ISX031 camera on the AM62P platform with the configuration: 1920*1536 resolution, UYVY422_8bit format, 30fps frame rate, using MAX96717 serializer and MAX96724 deserializer. Single-channel video stream development has been completed, but when verifying multi-channel video streams, the system blocks and fails to capture images.

2. I suspect this is a MIPI bandwidth issue. The current MIPI bandwidth of the deserializer is 2Gbps/lane, 4lane. How should CSIRX or SOC side be adapted? 

3. I have already tried modifying the link frequency to 1000 MHz or any other value above 800 MHz before, but it always resulted in an error as shown below.

Could someone help me? Thanks!

root@am62pxx-evm:~# yavta /dev/video3 -c1 -n1 -s1920x1536 -fUYVY -Fvideo.yuv
Device /dev/video3 opened.
Device `j721e-csi2rx' on `platform:30102000.ticsi2rx' (driver 'j721e-csi2rx') supports video, capture, without mplanes.
Video f[   58.227598] cdns-csi2rx 30101000.csi-bridge: Get link frequency from V4L2_CID_LINK_FREQ: 1000000000 Hz
ormat set: UYVY (59565955) 1920x1536 (stride 3840) field none bu[   58.239413] cdns-csi2rx 30101000.csi-bridge: Configuring DPHY with link frequency: 1000000000 Hz, number of lanes: 4
ffer size 5898240
Video format: UYVY (59565955) 1920x1536 (stri[   58.259748] cdns-csi2rx 30101000.csi-bridge: DPHY configured successfully with link frequency: 1000000000 Hz
de 3840) field none buffer size 5898240
1 buffers requested.
l[   58.275549] cdns-csi2rx 30101000.csi-bridge: Failed to start streams 0x3 on subdev
ength: 5898240 offset: 0 timestamp type/source: mono/EoF
Buffer 0/0 mapped at address 0xffffa0a80000.
[   58.293353] cdns-csi2rx 30101000.csi-bridge: Failed to stop streaming on pad0
[   58.310559] cdns-csi2rx 30101000.csi-bridge: Failed to stop streaming on pad1
[   58.327818] cdns-csi2rx 30101000.csi-bridge: Failed to stop streaming on pad2
[   58.347353] cdns-csi2rx 30101000.csi-bridge: Failed to stop streaming on pad3
Unable to start streaming: Invalid argument (22).
1 buffers released
  • Hi,

    I’ve assigned your query to the concerned expert. Please note that responses may be delayed due to the Christmas and New Year holidays. Please feel free to ping this thread if you don't receive a response latest by Jan 1st week

    Regards,
    Johnson

  • Hi Ying,

    1. Are you getting single channel video stream properly?

    2. Could you please share me your current device tree and driver ?

    Regards,

    Dilna K

  • Hi Dilna,

    1. Currently, we have identified an issue with unstable output across the 4 video streams. It is impossible to determine which specific stream will output video, as the four streams alternately exhibit "output present/output absent" behavior.

    2. I have forwarded the currently used driver code to you via James's email. Could you please assist with verification and troubleshooting? 

    3. The command for single-channel video stream output is:

    gst-launch-1.0 v4l2src device="/dev/video3" ! video/x-raw, width=1920, height=1536, format=UYVY ! queue ! kmssink driver-name=tidss sync=false.

    Could you please tell me how to modify the command for dual-channel and multi-channel video stream output? 

    Thank you!

  • Hi,

    Additionally, I've noticed that others usually check these registers. Could you please check them for me as well? Thank you.

    root@am62pxx-evm:~# devmem2 0x30101020 w
    /dev/mem opened.
    Memory mapped at address 0xffff9a962000.
    Read at address  0x30101020 (0xffff9a962020): 0x00000072
    root@am62pxx-evm:~# devmem2 0x30101104 w
    /dev/mem opened.
    Memory mapped at address 0xffff8d415000.
    Read at address  0x30101104 (0xffff8d415104): 0x00000000
    root@am62pxx-evm:~# devmem2 0x30111000 w
    /dev/mem opened.
    Memory mapped at address 0xffffa49e7000.
    Read at address  0x30111000 (0xffffa49e7000): 0x40800000
    

  • Hi Ying,

    let me go through your code. 

    1. Could you please share your current media-ctl -p? with four cameras connected together?

    2. You can use the below pipeline for multiple camera streaming.

    gst-launch-1.0 -v \
    v4l2src device=/dev/video-imx219-cam0 io-mode=5 ! queue leaky=2 ! video/x-bayer, width=1920,
    height=1080, format=rggb ! tiovxisp sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/
    imaging/imx219/dcc_viss.bin format-msb=7 sink_0::dcc-2a-file=/opt/imaging/imx219/dcc_2a.bin
    sink_0::device=/dev/v4l-imx219-subdev0 ! video/x-raw, format=NV12 ! \
    tiovxmultiscaler target=0 name=split_01 \
    split_01. ! queue ! video/x-raw, width=1110, height=690 ! tiovxmultiscaler target=0 ! video/x-
    raw, width=300, height=300 ! tiovxdlpreproc data-type=3 channel-order=1 tensor-format=rgb out-
    pool-size=4 ! application/x-tensor-tiovx ! tidlinferer target=1 model=/opt/model_zoo/TFL-OD-2000-
    ssd-mobV1-coco-mlperf-300x300 ! post_0.tensor \
    split_01. ! queue ! video/x-raw, width=640, height=360 ! post_0.sink \
    tidlpostproc name=post_0 model=/opt/model_zoo/TFL-OD-2000-ssd-mobV1-coco-mlperf-300x300
    alpha=0.400000 viz-threshold=0.600000 top-N=5 ! queue ! mosaic_0. \
    \
    v4l2src device=/dev/video-imx219-cam1 io-mode=5 ! queue leaky=2 ! video/x-bayer, width=1920,
    height=1080, format=rggb ! tiovxisp sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/
    imaging/imx219/dcc_viss.bin format-msb=7 sink_0::dcc-2a-file=/opt/imaging/imx219/dcc_2a.bin
    sink_0::device=/dev/v4l-imx219-subdev1 ! video/x-raw, format=NV12 ! \
    tiovxmultiscaler target=0 name=split_11 \
    split_11. ! queue ! video/x-raw, width=1110, height=690 ! tiovxmultiscaler target=0 ! video/x-
    raw, width=300, height=300 ! tiovxdlpreproc data-type=3 channel-order=1 tensor-format=rgb out-
    pool-size=4 ! application/x-tensor-tiovx ! tidlinferer target=1 model=/opt/model_zoo/TFL-OD-2000-
    ssd-mobV1-coco-mlperf-300x300 ! post_1.tensor \
    split_11. ! queue ! video/x-raw, width=640, height=360 ! post_1.sink \
    tidlpostproc name=post_1 model=/opt/model_zoo/TFL-OD-2000-ssd-mobV1-coco-mlperf-300x300
    alpha=0.400000 viz-threshold=0.600000 top-N=5 ! queue ! mosaic_0. \
    \
    v4l2src device=/dev/video-imx219-cam2 io-mode=5 ! queue leaky=2 ! video/x-bayer, width=1920,
    height=1080, format=rggb ! tiovxisp sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/
    imaging/imx219/dcc_viss.bin format-msb=7 sink_0::dcc-2a-file=/opt/imaging/imx219/dcc_2a.bin
    sink_0::device=/dev/v4l-imx219-subdev2 ! video/x-raw, format=NV12 ! \
    tiovxmultiscaler target=1 name=split_21 \
    split_21. ! queue ! video/x-raw, width=1110, height=690 ! tiovxmultiscaler target=1 ! video/x-
    raw, width=300, height=300 ! tiovxdlpreproc data-type=3 channel-order=1 tensor-format=rgb out-
    pool-size=4 ! application/x-tensor-tiovx ! tidlinferer target=1 model=/opt/model_zoo/TFL-OD-2000-
    ssd-mobV1-coco-mlperf-300x300 ! post_2.tensor \
    split_21. ! queue ! video/x-raw, width=640, height=360 ! post_2.sink \
    tidlpostproc name=post_2 model=/opt/model_zoo/TFL-OD-2000-ssd-mobV1-coco-mlperf-300x300
    alpha=0.400000 viz-threshold=0.600000 top-N=5 ! queue ! mosaic_0. \
    \

    Link:-  You can refer the below link for multiple camera streaming

    https://www.ti.com/lit/an/spradh2a/spradh2a.pdf?ts=1767089483974&ref_url=https%253A%252F%252Fwww.bing.com%252F

    Regards,

    Dilna K

  • Sure Ying. let me go through these

    Regards,

    Dilna K 

  • Hi Dilna,

    1. Below are the results of my media_ctl -p command. I have uploaded this before.

    root@am62pxx-evm:~# media-ctl -p
    Media controller API version 6.6.58
    
    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.6.58
    
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 4 routes)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
            routes:
                    0/1 -> 3/0 [ACTIVE]
                    0/2 -> 4/0 [ACTIVE]
                    0/3 -> 5/0 [ACTIVE]
                    0/4 -> 6/0 [ACTIVE]
            pad0: Sink
                    [stream:1 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:2 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:3 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:4 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
            pad1: Source
                    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
            pad2: Source
                    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
            pad3: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
            pad4: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
            pad5: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
            pad6: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx context 5":0 [ENABLED,IMMUTABLE]
    
    - entity 9: cdns_csi2rx.30101000.csi-bridge (5 pads, 2 links, 4 routes)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
            routes:
                    0/1 -> 1/1 [ACTIVE]
                    0/2 -> 1/2 [ACTIVE]
                    0/3 -> 1/3 [ACTIVE]
                    0/4 -> 1/4 [ACTIVE]
            pad0: Sink
                    [stream:1 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:2 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:3 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:4 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "ds90ub960 2-0027":4 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:1 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:2 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:3 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:4 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
            pad2: Source
            pad3: Source
            pad4: Source
    
    - entity 15: ds90ub960 2-0027 (6 pads, 5 links, 4 routes)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev2
            routes:
                    1/0 -> 4/1 [ACTIVE]
                    0/0 -> 4/2 [ACTIVE]
                    2/0 -> 4/3 [ACTIVE]
                    3/0 -> 4/4 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "ds90ub953 2-0040":1 [ENABLED,IMMUTABLE]
            pad1: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "ds90ub953 2-0045":1 [ENABLED,IMMUTABLE]
            pad2: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "ds90ub953 2-0046":1 [ENABLED,IMMUTABLE]
            pad3: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "ds90ub953 2-0047":1 [ENABLED,IMMUTABLE]
            pad4: Source
                    [stream:1 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:2 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:3 fmt:UYVY8_1X16/1920x1536 field:none]
                    [stream:4 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
            pad5: Source
    
    - entity 24: ds90ub953 2-0047 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev3
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "imx219 8-001a":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "ds90ub960 2-0027":3 [ENABLED,IMMUTABLE]
    
    - entity 29: ds90ub953 2-0046 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev4
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "imx219 7-001a":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "ds90ub960 2-0027":2 [ENABLED,IMMUTABLE]
    
    - entity 34: ds90ub953 2-0040 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev5
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "imx219 6-001a":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "ds90ub960 2-0027":0 [ENABLED,IMMUTABLE]
    
    - entity 39: ds90ub953 2-0045 (2 pads, 2 links, 1 route)
                 type V4L2 subdev subtype Unknown flags 0
                 device node name /dev/v4l-subdev6
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    <- "imx219 5-001a":0 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none]
                    -> "ds90ub960 2-0027":1 [ENABLED,IMMUTABLE]
    
    - entity 44: imx219 5-001a (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev7
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:none quantization:full-range
                     crop.bounds:(8,8)/1920x1536
                     crop:(8,8)/1920x1536]
                    -> "ds90ub953 2-0045":0 [ENABLED,IMMUTABLE]
    
    - entity 48: imx219 6-001a (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev8
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:none quantization:full-range
                     crop.bounds:(8,8)/1920x1536
                     crop:(8,8)/1920x1536]
                    -> "ds90ub953 2-0040":0 [ENABLED,IMMUTABLE]
    
    - entity 52: imx219 7-001a (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev9
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:none quantization:full-range
                     crop.bounds:(8,8)/1920x1536
                     crop:(8,8)/1920x1536]
                    -> "ds90ub953 2-0046":0 [ENABLED,IMMUTABLE]
    
    - entity 56: imx219 8-001a (1 pad, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev10
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1920x1536 field:none colorspace:srgb xfer:none quantization:full-range
                     crop.bounds:(8,8)/1920x1536
                     crop:(8,8)/1920x1536]
                    -> "ds90ub953 2-0047":0 [ENABLED,IMMUTABLE]
    
    - entity 62: 30102000.ticsi2rx context 0 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video2
            pad0: Sink
                    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 68: 30102000.ticsi2rx context 1 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
            pad0: Sink
                    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 74: 30102000.ticsi2rx context 2 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
            pad0: Sink
                    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 80: 30102000.ticsi2rx context 3 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
            pad0: Sink
                    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 86: 30102000.ticsi2rx context 4 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video6
            pad0: Sink
                    <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 92: 30102000.ticsi2rx context 5 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video7
            pad0: Sink
                    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
    

    2. The AM62P chip does not have an ISP integrated, and the TIOVX component is not available. I have consulted with others and obtained the correct commands.

    3. I can output 4 video streams simultaneously, but there are issues of stuttering, duplicate frames, and unstable output—the streams work intermittently, sometimes outputting normally and sometimes failing to output at all.

    Has there been any recent progress? Could you please help ask Jianzhong about this?

    Regards,

    Ying

  • Hi Ying,

    Your media-ctl command looks good. I think the issue is with your pipeline. could you please share your pipeline that you are using currently?

    and also please share your dmesg logs while streaming.

    I have informed Jianzhong, but he was out of office due to xmas new year holidays.

    Regards,

    Dilna K