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.

AM62A7-Q1: Does ti_csi2rx0 and cdns_csi2rx0 support two VC and two DT by default?

Part Number: AM62A7-Q1

Hello,

We need to port a sensor that outputs two data types on vc0 and vc1, namely dt=0x2c and 0x30, with data formats of raw8 and raw12, respectively

May I ask if the current cdns csi2rx. c and j721e csi2rx. c drivers support this configuration? Or do you need to modify the code for these two files?

Regards,

Gary

  • Hi Thanks for your query.

    Our expert will look into this and get back to you.

    Regards

  • Hello Gary,

    Does your raw8/raw12 mean gray scale 8/12-bit, or raw Bayer format like RGGB, BGGR, etc, in 8/12-bit?

    Regards,

    Jianzhong

  • Hello,

    The data generated by the sensor is in layer format: BGGR, 8/12-bit, with corresponding v4l2 formats of V4L2-PIX-FMT-SBGGR12 and V4L2-PIX-FMT-SBGGR8, respectively.

    Regards,

    Gary

  • Hello,

    I have read the j721e-csi2rx. c code file and can see that according to the following configuration of k3-am62a-main.dtsi:
    Dma-names="rx0", "rx1", "rx2", "rx3", "rx4", "rx5";
    I have created 6 video devices, but I am not sure if each video device can correspond to a combination of DT and VC:

    Namely: video0 corresponds to data from vc0, dt=0x2c, video1 corresponds to data from vc0, dt=0x30, video2 corresponds to data from vc1, dt=0x2c, video3 corresponds to data from vc1, dt=0x30
    Or do I need to modify the j721e-csi2rx. c and cdns-csi2rx. c driver code myself to support this configuration?

    Regards,

    Gary

  • Hi Gary,

    On each virtual channel, does the sensor output both data types simultaneously, or does it only output one data type at a time? If the sensor only outputs one data type at any given time, there is no need to have one video device for each data type.

    Regards,

    Jianzhong

  • Hello,

    The allocation of mipi transmission DT and VC is as follows:

    We use four videos on the Ruixin Micro RK3568 platform, namely: video0 corresponds to data from vc0, dt=0x2c, video1 corresponds to data from vc0, dt=0x30, video2 corresponds to data from vc1, dt=0x2c, video3 corresponds to data from vc1, dt=0x30

    Regards,

    Gary

  • Hi Gary,

    Thanks for the additional information. This is feasible on AM62A.

    No modification is needed in the CSI drivers (j721e-csi2rx. c and cdns-csi2rx. c). We have tested this capability by use cases where the DS90UB960 (FPDLink deserializer) sends mixed-datatype and virtual channel streams on same CSI2 port, and we can route the streams to separate video nodes.

    Your sensor driver must support:

    1. Streams routing APIs. It should have 4 streams on the output pad, with correct formats. You can look at OV2312 and UB960 driver for examples of how to set initial routing and formats for multiple streams.
      1. https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/drivers/media/i2c/ov2312.c?h=ti-linux-6.1.y
      2. git.ti.com/.../ds90ub960.c
    2. get_frame_desc() API that will have entries for each stream, specifying correct vc/dt, length, fmt etc. Again OV2312 and UB960 both have examples of this.

    If your sensor drivers supports both of these two, you can use media-ctl to route the 4 streams through cdns-csi2rx and j721e-csi2rx subdevs to different video nodes. Examples of setting up the routes can be found here: https://github.com/TexasInstruments/edgeai-gst-apps/blob/main/scripts/setup_cameras.sh.

    Regards,

    Jianzhong

  • Hi Jianzhong,

        Since our sensor is directly connected to the SOC through mipi-csi2 and does not pass through the deserializer, how to configure the dtso file?

  • Hi Jianzhong,

        Through the configuration of k3-am62x-sk-csi2-imx219.dtso, our pipeline is as follows. I understand that our configuration is correct.

        

  • Hi Jianzhong,

        1.I configure routing in the sensor driver as follows:
    struct v4l2_subdev_route routes[] = {
    {
    .source_pad = 0,
    .source_stream = 0,
    .flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
    },
    {
    .source_pad = 0,
    .source_stream = 1,
    .flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
    },
    {
    .source_pad = 0,
    .source_stream = 2,
    .flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
    },
    {
    .source_pad = 0,
    .source_stream = 3,
    .flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
    },
    };

        2.The format corresponding to each stream is initialized as follows:
    static void sensor_init_formats(struct v4l2_subdev_state *state)
    {
    struct v4l2_mbus_framefmt *format;
    int i;

    for (i = 0; i < 4; ++i) {
    format = v4l2_subdev_state_get_stream_format(state, 0, i);
    format->code = sensor_mbus_formats[i];
    format->width = sensor_framesizes[i].width;
    format->height = sensor_framesizes[i].height;
    format->field = V4L2_FIELD_NONE;
    format->colorspace = V4L2_COLORSPACE_DEFAULT;
    }
    }

        3.sensor_mbus_formats and sensor_framesizes are defined as follows:
    static const u32 sensor_mbus_formats[] = {
    MEDIA_BUS_FMT_SBGGR12_1X12,
    MEDIA_BUS_FMT_SBGGR12_1X12,
    MEDIA_BUS_FMT_SBGGR8_1X8,
    MEDIA_BUS_FMT_SBGGR8_1X8,
    };
    static const struct v4l2_area sensor_framesizes[] = {
    {
    .width = 480,
    .height = 128,
    },
    {
    .width = 480,
    .height = 128,
    },
    {
    .width = 40,
    .height = 1,
    },
    {
    .width = 40,
    .height = 1,
    },
    };

        4.The driver's get_frame_desc function is implemented as follows:

    static int sensor_get_frame_desc(struct v4l2_subdev *sd, unsigned int pad,
    struct v4l2_mbus_frame_desc *fd)
    {
    struct v4l2_subdev_state *state;
    struct v4l2_mbus_framefmt *fmt;
    struct v4l2_subdev_route *route;
    u32 bpp;
    int ret = 0;
    unsigned int i;

    printk("pad: %d, name:%s, fd: %p", pad, sd->name, fd);

    if (pad != 0)
    return -EINVAL;

    state = v4l2_subdev_lock_and_get_active_state(sd);

    memset(fd, 0, sizeof(*fd));
    fd->type = V4L2_MBUS_FRAME_DESC_TYPE_CSI2;

    printk("num_routes: %d", state->routing.num_routes);

    /* pixel stream - 4 virtual channels */
    for (i = 0; i < state->routing.num_routes; ++i) {
    route = &state->routing.routes[i];

    DBG_ERROR("source_pad: %d, source_stream: %d", route->source_pad, route->source_stream);
    if (route->source_pad != pad)
    continue;

    fmt = v4l2_subdev_state_get_stream_format(state, 0, route->source_stream);
    if (!fmt) {
    ret = -EPIPE;
    goto out;
    }

    fd->entry[fd->num_entries].stream = fd->num_entries;
    fd->entry[fd->num_entries].flags = V4L2_MBUS_FRAME_DESC_FL_LEN_MAX;
    if (2 > fd->num_entries) {
    bpp = 16;
    fd->entry[fd->num_entries].bus.csi2.dt = MIPI_CSI2_DT_RAW12; /* RAW12 */
    fd->entry[fd->num_entries].length = fmt->width * fmt->height * bpp / 8;
    } else {
    bpp = 8;
    fd->entry[fd->num_entries].bus.csi2.dt = MIPI_CSI2_DT_USER_DEFINED(0); /* user defined RAW8 */
    fd->entry[fd->num_entries].length = fmt->width * fmt->height * bpp / 8;
    }

    fd->entry[fd->num_entries].pixelcode = fmt->code;
    fd->entry[fd->num_entries].bus.csi2.vc = fd->num_entries;

    DBG_ERROR("num_entries: %d, w*h: %d * %d, code: 0x%x, bpp: %d"
    , fd->num_entries, fmt->width, fmt->height, fmt->code, bpp);

    fd->num_entries++;
    }

    out:
    v4l2_subdev_unlock_state(state);

    return ret;
    }

  • Hi Jianzhong,

        1.If the sensor driver follows the above stream routing and stream format, will the routing configuration in the csi2rx_init_cfg function of the cdns-csi2rx.c file still hold?
    static int csi2rx_init_cfg(struct v4l2_subdev *subdev,
    struct v4l2_subdev_state *state)
    {
    struct v4l2_subdev_route routes[] = {
    {
    .sink_pad = CSI2RX_PAD_SINK,
    .sink_stream = 0,
    .source_pad = CSI2RX_PAD_SOURCE_STREAM0,
    .source_stream = 0,
    .flags = V4L2_SUBDEV_ROUTE_FL_ACTIVE,
    },
    };

    struct v4l2_subdev_krouting routing = {
    .num_routes = ARRAY_SIZE(routes),
    .routes = routes,
    };

    return _csi2rx_set_routing(subdev, state, &routing);
    }
        2.The source stream of routes[] only defines 0:
    .source_stream = 0,

  • fd->entry[fd->num_entries].bus.csi2.vc = fd->num_entries;

    Will this set your virtual channel id to 0,1,2, and 3 instead of just 0 and 1?

    If the sensor driver follows the above stream routing and stream format, will the routing configuration in the csi2rx_init_cfg function of the cdns-csi2rx.c file still hold?

    No, the cdns-csi2rx default route will be incorrect for your case. You should use "media-ctl -R" and "media-ctl -V" to update routes and formats on cdns subdev. 

    By the way, when you insert code, please use "Insert -> Code" as shown below. This will make it easier to read your code.

    Regards,

    Jianzhong

  • Hi Jianzhong,

        Will this set your virtual channel id to 0,1,2, and 3 instead of just 0 and 1?

    ------Here is a code bug, which has now been modified to:

    fd->entry[fd->num_entries].bus.csi2.vc = fd->num_entries % 2;

  • Hi Jianzhong,

        No, the cdns-csi2rx default route will be incorrect for your case. You should use "media-ctl -R" and "media-ctl -V" to update routes and formats on cdns subdev. 

    ------Do you mean that routing also needs to be configured using the media-ctl command, rather than being automatically implemented when the ti_csi2rx_start_streaming function is executed?

  • Hi Jianzhong,

        The following is my operation record and corresponding log on the serial port:

    ti_am62a7_serial_ti_am62ax_serial_2024-03-01_12_08_55.log
    [BEGIN] 2024/3/1 12:08:55
    Connecting to COM9...
    Connected.
    
    
    root@am62axx-evm:~# insmod ads6311.ko 
    [   39.306187] <DRV_ADS6311> [1970-01-01 00:00:45.851.720.375] <N> 8781 ----- Probe Start -------
    [   39.315016] SPI driver adaps,ads6311spi has no spi_device_id for adaps,ads6311spi
    [   39.322764] adaps,ads6311spi spi1.0: cam_sensor_spi_driver_probe() Line:6065
    [   39.330072] adaps,ads6311spi spi1.0: Consider updating driver adaps,ads6311spi to match on endpoints
    [   39.341546] <DRV_ADS6311> [1970-01-01 00:00:45.887.079.000] <E> 2508 enter: sensor_init_cfg
    [   39.349998] <DRV_ADS6311> [1970-01-01 00:00:45.895.533.530] <E> 2408 enter: _sensor_set_routing
    [   39.359868] <DRV_ADS6311> [1970-01-01 00:00:45.905.367.985] <N> 6087 done, ret:0!
    [   39.359868] 
    [   39.372478] <DRV_ADS6311> [1970-01-01 00:00:45.918.012.445] <N> 8829 ----- Start calib_flash_spi_driver Probe-------
    [   39.383115] SPI driver adaps,calib_flash has no spi_device_id for adaps,calib_flash
    [   39.396247] <DRV_ADS6311> [1970-01-01 00:00:45.941.781.380] <N> 8831 ----- Start calib_flash_spi_driver Probe--rc:0-----
    root@am62axx-evm:~# [   39.420653] <DRV_ADS6311> [1970-01-01 00:00:45.966.187.570] <E> 2508 enter: sensor_init_cfg
    [   39.429141] <DRV_ADS6311> [1970-01-01 00:00:45.974.676.965] <E> 2408 enter: _sensor_set_routing
    
    root@am62axx-evm:~# 
    root@am62axx-evm:~# 
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video0/dev_debug
    video4linux/v4l-subdev1/dev_debug
    echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debugroot@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video1/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    root@am62axx-evm:~# 
    root@am62axx-evm:~# media-ctl -l '"m00_dToF_ads6311 spi1.0":0->"cdns_csi2rx.30101000.csi-bridge":0[1], "cdns_csi2rx.30101000.csi-bridge":1->"30102000.ticsi2rx":0[1]'
    root@am62axx-evm:~# media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]"
    root@am62axx-evm:~# media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 1/0 [1], 0/1 -> 2/0 [1], 0/2 -> 3/0 [1], 0/3 -> 4/0 [1]]"
    root@am62axx-evm:~# media-ctl -d /dev/media0 --print-dot
    digraph board {
    	rankdir=TB
    	n00000001 [label="{{<port0> 0} | 30102000.ticsi2rx\n/dev/v4l-subdev0 | {<port1> 1 | <port2> 2 | <port3> 3 | <port4> 4 | <port5> 5 | <port6> 6}}", shape=Mrecord, style=filled, fillcolor=green]
    	n00000001:port1 -> n00000015 [style=bold]
    	n00000001:port2 -> n0000001b [style=bold]
    	n00000001:port3 -> n00000021 [style=bold]
    	n00000001:port4 -> n00000027 [style=bold]
    	n00000001:port5 -> n0000002d [style=bold]
    	n00000001:port6 -> n00000033 [style=bold]
    	n00000009 [label="{{<port0> 0} | cdns_csi2rx.30101000.csi-bridge\n/dev/v4l-subdev1 | {<port1> 1 | <port2> 2 | <port3> 3 | <port4> 4}}", shape=Mrecord, style=filled, fillcolor=green]
    	n00000009:port1 -> n00000001:port0 [style=bold]
    	n0000000f [label="{{} | m00_dToF_ads6311 spi1.0\n/dev/v4l-subdev2 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
    	n0000000f:port0 -> n00000009:port0 [style=bold]
    	n00000015 [label="30102000.ticsi2rx context 0\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
    	n0000001b [label="30102000.ticsi2rx context 1\n/dev/video1", shape=box, style=filled, fillcolor=yellow]
    	n00000021 [label="30102000.ticsi2rx context 2\n/dev/video2", shape=box, style=filled, fillcolor=yellow]
    	n00000027 [label="30102000.ticsi2rx context 3\n/dev/video3", shape=box, style=filled, fillcolor=yellow]
    	n0000002d [label="30102000.ticsi2rx context 4\n/dev/video4", shape=box, style=filled, fillcolor=yellow]
    	n00000033 [label="30102000.ticsi2rx context 5\n/dev/video5", shape=box, style=filled, fillcolor=yellow]
    }
    root@am62axx-evm:~# media-ctl -p
    Media controller API version 6.1.46
    
    [  154.499219] <DRV_ADS6311> [1970-01-01 00:02:41.044.756.185] <E> 2508 enter: sensor_init_cfg
    Media device information
    ------------------------
    driver      [  154.509642] <DRV_ADS6311> [1970-01-01 00:02:41.055.180.020] <E> 2408 enter: _sensor_set_routing
        j721e-csi2rx
    model           TI-CSI2RX
    serial          
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.1.46
    
    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/0 -> 1/0 [ACTIVE]
    		0/1 -> 2/0 [ACTIVE]
    		0/2 -> 3/0 [ACTIVE]
    		0/3 -> 4/0 [ACTIVE]
    	pad0: Sink
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:1 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:2 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:3 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
    	pad1: Source
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		-> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
    	pad2: Source
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		-> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
    	pad3: Source
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		-> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
    	pad4: Source
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		-> "30102000.ticsi2rx context 3":0 [ENABLED,IMMUTABLE]
    	pad5: Source
    		-> "30102000.ticsi2rx context 4":0 [ENABLED,IMMUTABLE]
    	pad6: Source
    		-> "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/0 -> 1/0 [ACTIVE]
    		0/1 -> 1/1 [ACTIVE]
    		0/2 -> 1/2 [ACTIVE]
    		0/3 -> 1/3 [ACTIVE]
    	pad0: Sink
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:1 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:2 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:3 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		<- "m00_dToF_ads6311 spi1.0":0 [ENABLED,IMMUTABLE]
    	pad1: Source
    		[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:1 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:2 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		[stream:3 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
    		-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
    	pad2: Source
    	pad3: Source
    	pad4: Source
    
    - entity 15: m00_dToF_ads6311 spi1.0 (1 pad, 1 link, 0 route)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev2
    	pad0: Source
    		-> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
    
    - entity 21: 30102000.ticsi2rx context 0 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video0
    	pad0: Sink
    		<- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]
    
    - entity 27: 30102000.ticsi2rx context 1 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video1
    	pad0: Sink
    		<- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]
    
    - entity 33: 30102000.ticsi2rx context 2 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video2
    	pad0: Sink
    		<- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]
    
    - entity 39: 30102000.ticsi2rx context 3 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
    	pad0: Sink
    		<- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]
    
    - entity 45: 30102000.ticsi2rx context 4 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
    	pad0: Sink
    		<- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]
    
    - entity 51: 30102000.ticsi2rx context 5 (1 pad, 1 link, 0 route)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
    	pad0: Sink
    		<- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
    
    root@am62axx-evm:~# v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=480,height=128,pixelformat='BG12' --stream-mmap=6 --stream-skip=4 --stream-to=/tmp/480x4096_SBGGR12_1X12.raw12 --stream-count=5 --stream-poll
    VIDIOC_QUERYCAP: ok
    VIDIOC_G_FMT: ok
    VIDIOC_S_FMT: ok
    Format Video Capture:
    	Width/Height      : 480/128
    	Pixel Format      : 'BG12' (12-bit Bayer BGBG/GRGR)
    	Fi[  194.273417] j721e-csi2rx 30102000.ticsi2rx: validating link "m00_dToF_ads6311 spi1.0":0 -> "cdns_csi2rx.30101000.csi-bridge":0
    eld             : None
    	Bytes per Line    : 960
    	Size Image   [  194.286749] j721e-csi2rx 30102000.ticsi2rx: Dangling sink streams: mask 0xe
         : 122880
    	Colorspace        : sRGB
    	Transfer Function : Default (maps to sRGB)
    	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
    	Quantization      : Default (maps to Full Range)
    	Flags             : 
    		VIDIOC_REQBUFS returned 0 (Success)
    		VIDIOC_QUERYBUF returned 0 (Success)
    		VIDIOC_QUERYBUF returned 0 (Success)
    		VIDIOC_QUERYBUF returned 0 (Success)
    		VIDIOC_QUERYBUF returned 0 (Success)
    		VIDIOC_QUERYBUF returned 0 (Success)
    		VIDIOC_QUERYBUF returned 0 (Success)
    		VIDIOC_QBUF returned 0 (Success)
    		VIDIOC_QBUF returned 0 (Success)
    		VIDIOC_QBUF returned 0 (Success)
    		VIDIOC_QBUF returned 0 (Success)
    		VIDIOC_QBUF returned 0 (Success)
    		VIDIOC_QBUF returned 0 (Success)
    		VIDIOC_STREAMON returned -1 (Invalid argument)
    root@am62axx-evm:~# dmesg
    [   39.306187] <DRV_ADS6311> [1970-01-01 00:00:45.851.720.375] <N> 8781 ----- Probe Start -------
    [   39.315016] SPI driver adaps,ads6311spi has no spi_device_id for adaps,ads6311spi
    [   39.322764] adaps,ads6311spi spi1.0: cam_sensor_spi_driver_probe() Line:6065
    [   39.330072] adaps,ads6311spi spi1.0: Consider updating driver adaps,ads6311spi to match on endpoints
    [   39.341546] <DRV_ADS6311> [1970-01-01 00:00:45.887.079.000] <E> 2508 enter: sensor_init_cfg
    [   39.349998] <DRV_ADS6311> [1970-01-01 00:00:45.895.533.530] <E> 2408 enter: _sensor_set_routing
    [   39.359868] <DRV_ADS6311> [1970-01-01 00:00:45.905.367.985] <N> 6087 done, ret:0!
    
    [   39.372478] <DRV_ADS6311> [1970-01-01 00:00:45.918.012.445] <N> 8829 ----- Start calib_flash_spi_driver Probe-------
    [   39.383115] SPI driver adaps,calib_flash has no spi_device_id for adaps,calib_flash
    [   39.396247] <DRV_ADS6311> [1970-01-01 00:00:45.941.781.380] <N> 8831 ----- Start calib_flash_spi_driver Probe--rc:0-----
    [   39.420653] <DRV_ADS6311> [1970-01-01 00:00:45.966.187.570] <E> 2508 enter: sensor_init_cfg
    [   39.429141] <DRV_ADS6311> [1970-01-01 00:00:45.974.676.965] <E> 2408 enter: _sensor_set_routing
    [  100.536077] videodev: v4l2_open: v4l-subdev1: open (0)
    [  100.536135] videodev: v4l2_release: v4l-subdev1: release
    [  106.637507] videodev: v4l2_open: v4l-subdev0: open (0)
    [  106.637564] videodev: v4l2_release: v4l-subdev0: release
    [  154.498021] videodev: v4l2_open: v4l-subdev0: open (0)
    [  154.498695] videodev: v4l2_open: v4l-subdev1: open (0)
    [  154.499219] <DRV_ADS6311> [1970-01-01 00:02:41.044.756.185] <E> 2508 enter: sensor_init_cfg
    [  154.509642] <DRV_ADS6311> [1970-01-01 00:02:41.055.180.020] <E> 2408 enter: _sensor_set_routing
    [  154.523870] videodev: v4l2_open: v4l-subdev2: open (0)
    [  154.862522] videodev: v4l2_release: v4l-subdev0: release
    [  154.863173] videodev: v4l2_release: v4l-subdev1: release
    [  154.863648] videodev: v4l2_release: v4l-subdev2: release
    [  194.258677] videodev: v4l2_open: video0: open (0)
    [  194.258757] video0: VIDIOC_QUERYCAP: driver=j721e-csi2rx, card=j721e-csi2rx, bus=platform:30102000.ticsi2rx, version=0x0006012e, capabilities=0xa4200001, device_caps=0x24200001
    [  194.258827] video0: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
    [  194.258911] video0: VIDIOC_TRY_EXT_CTRLS: error -25: which=0x0, count=0, error_idx=0, request_fd=0
    [  194.258969] video0: VIDIOC_QUERYCTRL: error -25: id=0x80000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.259028] video0: VIDIOC_G_SELECTION: error -25: type=vid-cap, target=0, flags=0x0, wxh=0x0, x,y=0,0
    [  194.259088] video0: VIDIOC_QUERYCAP: driver=j721e-csi2rx, card=j721e-csi2rx, bus=platform:30102000.ticsi2rx, version=0x0006012e, capabilities=0xa4200001, device_caps=0x24200001
    [  194.259689] video0: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
    [  194.259774] video0: VIDIOC_QUERYCTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.259834] video0: VIDIOC_QUERYCTRL: error -25: id=0x980900, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.259892] video0: VIDIOC_QUERYCTRL: error -25: id=0x980901, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.259948] video0: VIDIOC_QUERYCTRL: error -25: id=0x980902, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260005] video0: VIDIOC_QUERYCTRL: error -25: id=0x980903, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260181] video0: VIDIOC_QUERYCTRL: error -25: id=0x980904, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260240] video0: VIDIOC_QUERYCTRL: error -25: id=0x980905, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260296] video0: VIDIOC_QUERYCTRL: error -25: id=0x980906, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260353] video0: VIDIOC_QUERYCTRL: error -25: id=0x980907, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260410] video0: VIDIOC_QUERYCTRL: error -25: id=0x980908, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260466] video0: VIDIOC_QUERYCTRL: error -25: id=0x980909, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260523] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260580] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260636] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260693] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260749] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260805] video0: VIDIOC_QUERYCTRL: error -25: id=0x98090f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260862] video0: VIDIOC_QUERYCTRL: error -25: id=0x980910, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260918] video0: VIDIOC_QUERYCTRL: error -25: id=0x980911, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.260975] video0: VIDIOC_QUERYCTRL: error -25: id=0x980912, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261031] video0: VIDIOC_QUERYCTRL: error -25: id=0x980913, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261088] video0: VIDIOC_QUERYCTRL: error -25: id=0x980914, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261144] video0: VIDIOC_QUERYCTRL: error -25: id=0x980915, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261200] video0: VIDIOC_QUERYCTRL: error -25: id=0x980916, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261256] video0: VIDIOC_QUERYCTRL: error -25: id=0x980917, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261312] video0: VIDIOC_QUERYCTRL: error -25: id=0x980918, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261368] video0: VIDIOC_QUERYCTRL: error -25: id=0x980919, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261424] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261481] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261537] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261593] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261650] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261706] video0: VIDIOC_QUERYCTRL: error -25: id=0x98091f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261762] video0: VIDIOC_QUERYCTRL: error -25: id=0x980920, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261818] video0: VIDIOC_QUERYCTRL: error -25: id=0x980921, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261874] video0: VIDIOC_QUERYCTRL: error -25: id=0x980922, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261931] video0: VIDIOC_QUERYCTRL: error -25: id=0x980923, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.261987] video0: VIDIOC_QUERYCTRL: error -25: id=0x980924, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262044] video0: VIDIOC_QUERYCTRL: error -25: id=0x980925, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262100] video0: VIDIOC_QUERYCTRL: error -25: id=0x980926, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262156] video0: VIDIOC_QUERYCTRL: error -25: id=0x980927, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262212] video0: VIDIOC_QUERYCTRL: error -25: id=0x980928, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262268] video0: VIDIOC_QUERYCTRL: error -25: id=0x980929, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262324] video0: VIDIOC_QUERYCTRL: error -25: id=0x98092a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262381] video0: VIDIOC_QUERYCTRL: error -25: id=0x98092b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262438] video0: VIDIOC_QUERYCTRL: error -25: id=0x8000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [  194.262515] video0: VIDIOC_G_FMT: type=vid-cap, width=640, height=480, pixelformat=UYVY little-endian (0x59565955), field=any, bytesperline=1280, sizeimage=614400, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  194.262649] video0: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  194.262710] video0: VIDIOC_ENUM_FMT: index=1, type=vid-cap, flags=0x0, pixelformat=YUYV little-endian (0x56595559), mbus_code=0x0000, description='YUYV 4:2:2'
    [  194.262763] video0: VIDIOC_ENUM_FMT: index=2, type=vid-cap, flags=0x0, pixelformat=UYVY little-endian (0x59565955), mbus_code=0x0000, description='UYVY 4:2:2'
    [  194.262814] video0: VIDIOC_ENUM_FMT: index=3, type=vid-cap, flags=0x0, pixelformat=YVYU little-endian (0x55595659), mbus_code=0x0000, description='YVYU 4:2:2'
    [  194.262865] video0: VIDIOC_ENUM_FMT: index=4, type=vid-cap, flags=0x0, pixelformat=VYUY little-endian (0x59555956), mbus_code=0x0000, description='VYUY 4:2:2'
    [  194.262915] video0: VIDIOC_ENUM_FMT: index=5, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  194.262966] video0: VIDIOC_ENUM_FMT: index=6, type=vid-cap, flags=0x0, pixelformat=GBRG little-endian (0x47524247), mbus_code=0x0000, description='8-bit Bayer GBGB/RGRG'
    [  194.263016] video0: VIDIOC_ENUM_FMT: index=7, type=vid-cap, flags=0x0, pixelformat=GRBG little-endian (0x47425247), mbus_code=0x0000, description='8-bit Bayer GRGR/BGBG'
    [  194.263067] video0: VIDIOC_ENUM_FMT: index=8, type=vid-cap, flags=0x0, pixelformat=RGGB little-endian (0x42474752), mbus_code=0x0000, description='8-bit Bayer RGRG/GBGB'
    [  194.263117] video0: VIDIOC_ENUM_FMT: index=9, type=vid-cap, flags=0x0, pixelformat=BG10 little-endian (0x30314742), mbus_code=0x0000, description='10-bit Bayer BGBG/GRGR'
    [  194.263169] video0: VIDIOC_ENUM_FMT: index=10, type=vid-cap, flags=0x0, pixelformat=GB10 little-endian (0x30314247), mbus_code=0x0000, description='10-bit Bayer GBGB/RGRG'
    [  194.263220] video0: VIDIOC_ENUM_FMT: index=11, type=vid-cap, flags=0x0, pixelformat=BA10 little-endian (0x30314142), mbus_code=0x0000, description='10-bit Bayer GRGR/BGBG'
    [  194.263271] video0: VIDIOC_ENUM_FMT: index=12, type=vid-cap, flags=0x0, pixelformat=RG10 little-endian (0x30314752), mbus_code=0x0000, description='10-bit Bayer RGRG/GBGB'
    [  194.263323] video0: VIDIOC_ENUM_FMT: index=13, type=vid-cap, flags=0x0, pixelformat=BG12 little-endian (0x32314742), mbus_code=0x0000, description='12-bit Bayer BGBG/GRGR'
    [  194.263383] video0: VIDIOC_S_FMT: type=vid-cap, width=480, height=128, pixelformat=BG12 little-endian (0x32314742), field=none, bytesperline=960, sizeimage=122880, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  194.263657] video0: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  194.263719] video0: VIDIOC_ENUM_FMT: index=1, type=vid-cap, flags=0x0, pixelformat=YUYV little-endian (0x56595559), mbus_code=0x0000, description='YUYV 4:2:2'
    [  194.263771] video0: VIDIOC_ENUM_FMT: index=2, type=vid-cap, flags=0x0, pixelformat=UYVY little-endian (0x59565955), mbus_code=0x0000, description='UYVY 4:2:2'
    [  194.263822] video0: VIDIOC_ENUM_FMT: index=3, type=vid-cap, flags=0x0, pixelformat=YVYU little-endian (0x55595659), mbus_code=0x0000, description='YVYU 4:2:2'
    [  194.263872] video0: VIDIOC_ENUM_FMT: index=4, type=vid-cap, flags=0x0, pixelformat=VYUY little-endian (0x59555956), mbus_code=0x0000, description='VYUY 4:2:2'
    [  194.263923] video0: VIDIOC_ENUM_FMT: index=5, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [  194.263974] video0: VIDIOC_ENUM_FMT: index=6, type=vid-cap, flags=0x0, pixelformat=GBRG little-endian (0x47524247), mbus_code=0x0000, description='8-bit Bayer GBGB/RGRG'
    [  194.264088] video0: VIDIOC_ENUM_FMT: index=7, type=vid-cap, flags=0x0, pixelformat=GRBG little-endian (0x47425247), mbus_code=0x0000, description='8-bit Bayer GRGR/BGBG'
    [  194.264144] video0: VIDIOC_ENUM_FMT: index=8, type=vid-cap, flags=0x0, pixelformat=RGGB little-endian (0x42474752), mbus_code=0x0000, description='8-bit Bayer RGRG/GBGB'
    [  194.264195] video0: VIDIOC_ENUM_FMT: index=9, type=vid-cap, flags=0x0, pixelformat=BG10 little-endian (0x30314742), mbus_code=0x0000, description='10-bit Bayer BGBG/GRGR'
    [  194.264247] video0: VIDIOC_ENUM_FMT: index=10, type=vid-cap, flags=0x0, pixelformat=GB10 little-endian (0x30314247), mbus_code=0x0000, description='10-bit Bayer GBGB/RGRG'
    [  194.264298] video0: VIDIOC_ENUM_FMT: index=11, type=vid-cap, flags=0x0, pixelformat=BA10 little-endian (0x30314142), mbus_code=0x0000, description='10-bit Bayer GRGR/BGBG'
    [  194.264350] video0: VIDIOC_ENUM_FMT: index=12, type=vid-cap, flags=0x0, pixelformat=RG10 little-endian (0x30314752), mbus_code=0x0000, description='10-bit Bayer RGRG/GBGB'
    [  194.264401] video0: VIDIOC_ENUM_FMT: index=13, type=vid-cap, flags=0x0, pixelformat=BG12 little-endian (0x32314742), mbus_code=0x0000, description='12-bit Bayer BGBG/GRGR'
    [  194.264917] video0: VIDIOC_CROPCAP: error -25: type=vid-cap, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
    [  194.265017] video0: VIDIOC_CROPCAP: error -25: type=vid-out, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
    [  194.265240] video0: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x2, id=0x0, flags=0x0
    [  194.265295] video0: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x5, id=0x0, flags=0x0
    [  194.265344] video0: VIDIOC_G_INPUT: value=0
    [  194.265383] video0: VIDIOC_ENUMINPUT: index=0, name=30102000.ticsi2rx context 0, type=2, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x0
    [  194.267925] video0: VIDIOC_REQBUFS: count=6, type=vid-cap, memory=mmap
    [  194.268140] video0: VIDIOC_QUERYBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=122880
    [  194.268184] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268236] video0: VIDIOC_QUERYBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1e000, length=122880
    [  194.268270] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268303] video0: VIDIOC_QUERYBUF: 00:00:00.000000 index=2, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x3c000, length=122880
    [  194.268336] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268367] video0: VIDIOC_QUERYBUF: 00:00:00.000000 index=3, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x5a000, length=122880
    [  194.268399] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268431] video0: VIDIOC_QUERYBUF: 00:00:00.000000 index=4, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x78000, length=122880
    [  194.268464] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268494] video0: VIDIOC_QUERYBUF: 00:00:00.000000 index=5, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x96000, length=122880
    [  194.268527] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268607] videodev: v4l2_mmap: video0: mmap (0)
    [  194.268656] videodev: v4l2_mmap: video0: mmap (0)
    [  194.268684] videodev: v4l2_mmap: video0: mmap (0)
    [  194.268709] videodev: v4l2_mmap: video0: mmap (0)
    [  194.268733] videodev: v4l2_mmap: video0: mmap (0)
    [  194.268757] videodev: v4l2_mmap: video0: mmap (0)
    [  194.268794] video0: VIDIOC_QBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=122880, offset/userptr=0x0, length=122880
    [  194.268828] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268867] video0: VIDIOC_QBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=122880, offset/userptr=0x1e000, length=122880
    [  194.268901] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268933] video0: VIDIOC_QBUF: 00:00:00.000000 index=2, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=122880, offset/userptr=0x3c000, length=122880
    [  194.268966] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.268998] video0: VIDIOC_QBUF: 00:00:00.000000 index=3, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=122880, offset/userptr=0x5a000, length=122880
    [  194.269032] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.269064] video0: VIDIOC_QBUF: 00:00:00.000000 index=4, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=122880, offset/userptr=0x78000, length=122880
    [  194.269097] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.269128] video0: VIDIOC_QBUF: 00:00:00.000000 index=5, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=122880, offset/userptr=0x96000, length=122880
    [  194.269161] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [  194.269197] video0: VIDIOC_G_FMT: type=vid-cap, width=480, height=128, pixelformat=BG12 little-endian (0x32314742), field=none, bytesperline=960, sizeimage=122880, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [  194.273417] j721e-csi2rx 30102000.ticsi2rx: validating link "m00_dToF_ads6311 spi1.0":0 -> "cdns_csi2rx.30101000.csi-bridge":0
    [  194.286749] j721e-csi2rx 30102000.ticsi2rx: Dangling sink streams: mask 0xe
    [  194.299824] video0: VIDIOC_STREAMON: error -22: type=vid-cap
    [  194.310267] videodev: v4l2_release: video0: release
    

        The following error occurred when finally starting the stream:
    [194.286749] j721e-csi2rx 30102000.ticsi2rx: Dangling sink streams: mask 0xe

  • Hi Jianzhong,

        This problem has been solved:
    [194.286749] j721e-csi2rx 30102000.ticsi2rx: Dangling sink streams: mask 0xe

  • Hi Jianzhong,

        When I execute the following command:
    4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream -to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=1 --stream-poll
        The set width is 40 bytes, but the actual calculated width is 32 bytes:
    [ 54.505828] video2: VIDIOC_S_FMT: type=vid-cap, width=32, height=1, pixelformat=BA81 little-endian (0x31384142), field=none, bytesperline=32, sizeimage=32, colorspace=8, flags=0x0 , ycbcr_enc=0, quantization=0, xfer_func=0
        The following is the corresponding serial port log. How to solve it?

    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video0/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video1/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video2/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/video3/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev0/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev1/dev_debug
    root@am62axx-evm:~# echo 0xff > /sys/class/video4linux/v4l-subdev2/dev_debug
    root@am62axx-evm:~# media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]"
    root@am62axx-evm:~# media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 1/0 [1], 0/1 -> 2/0 [1], 0/2 -> 3/0 [1], 0/3 -> 4/0 [1]]"
    root@am62axx-evm:~# v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=1 --stream-poll
    VIDIOC_QUERYCAP: ok
    VIDIOC_G_FMT: ok
    [ 54.472060] ti_csi2rx_try_fmt_vid_cap: width*height: 40*1, pixelformat: 825770306.
    [ 54.481032] ti_csi2rx_fill_fmt: width: 40, pixels_in_word: 16, bpp: 8.
    [ 54.487584] ti_csi2rx_fill_fmt: clamp_t width: 40.
    [ 54.492387] ti_csi2rx_fill_fmt: rounddown width: 32.
    [ 54.497365] ti_csi2rx_fill_fmt: width*height: 32*1, bpp: 8, bpl: 32, pixelformat: 825770306.
    VIDIOC_S_FMT: ok
    Format Video Capture:
    Width/Height : 32/1
    Pixel Format [ 54.512162] j721e-csi2rx 30102000.ticsi2rx: validating link "m00_dToF_ads6311 spi1.0":0:15 -> "cdns_csi2rx.30101000.csi-bridge":0:15
    : 'BA81' (8-bit Bayer BGBG/GRGR)
    Field : None[ 54.524971] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:0 -> "cdns_csi2rx.30101000.csi-bridge":0:0

    Bytes per Line : 32
    Size Image : 32
    Colorspace [ 54.542398] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:0 (but that's ok)
    : sRGB
    Transfer Function : Default (maps to sRGB)
    YCb[ 54.558253] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:1 -> "cdns_csi2rx.30101000.csi-bridge":0:1
    Cr/HSV Encoding: Default (maps to ITU-R 601)
    Quantization [ 54.575671] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:1 (but that's ok)
    : Default (maps to Full Range)
    Flags :
    VIDIOC[ 54.591539] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:2 -> "cdns_csi2rx.30101000.csi-bridge":0:2
    _REQBUFS returned 0 (Success)
    VIDIOC_QUERYBUF returned 0 (Suc[ 54.608968] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:2 (but that's ok)
    cess)
    VIDIOC_QUERYBUF returned 0 (Success)
    VIDIOC_QUERYBUF[ 54.624835] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:3 -> "cdns_csi2rx.30101000.csi-bridge":0:3
    returned 0 (Success)
    VIDIOC_QUERYBUF returned 0 (Success)
    [ 54.642272] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:3 (but that's ok)
    VIDIOC_QUERYBUF returned 0 (Success)
    VIDIOC_QUERYBUF returne[ 54.658152] j721e-csi2rx 30102000.ticsi2rx: video_device_pipeline_start
    d 0 (Success)
    VIDIOC_QBUF returned 0 (Success)
    VIDIOC_QBUF[ 54.670276] j721e-csi2rx 30102000.ticsi2rx: remote entity name: 30102000.ticsi2rx, remote pad index: 3, idx: 2.
    returned 0 (Success)
    VIDIOC_QBUF returned 0 (Success)
    VID[ 54.685884] j721e-csi2rx 30102000.ticsi2rx: subdev: 30102000.ticsi2rx, num_routes: 4.
    IOC_QBUF returned 0 (Success)
    VIDIOC_QBUF returned 0 (Success[ 54.699240] j721e-csi2rx 30102000.ticsi2rx: subdev: 30102000.ticsi2rx, sink_pad: 0, sink_stream: 0, source_pad: 1, source_stream: 0.
    )
    VIDIOC_QBUF returned 0 (Success)
    [ 54.716664] j721e-csi2rx 30102000.ticsi2rx: subdev: 30102000.ticsi2rx, sink_pad: 0, sink_stream: 1, source_pad: 2, source_stream: 0.
    [ 54.731929] j721e-csi2rx 30102000.ticsi2rx: subdev: 30102000.ticsi2rx, sink_pad: 0, sink_stream: 2, source_pad: 3, source_stream: 0.
    [ 54.743833] j721e-csi2rx 30102000.ticsi2rx: source sd name: cdns_csi2rx.30101000.csi-bridge, index: 1, stream: 2.
    [ 54.754107] cdns-csi2rx 30101000.csi-bridge: subdev: m00_dToF_ads6311 spi1.0, entity.name: cdns_csi2rx.30101000.csi-bridge, remote_pad index: 0.
    [ 54.767060] num_routes: 4
    [ 54.767066] <DRV_ADS6311> [1970-01-01 00:01:01.164.958.850] <E> 2509 source_pad: 0, source_stream: 0
    [ 54.778823] <DRV_ADS6311> [1970-01-01 00:01:01.176.715.810] <E> 2535 num_entries: 0, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 54.789956] <DRV_ADS6311> [1970-01-01 00:01:01.187.849.315] <E> 2509 source_pad: 0, source_stream: 1
    [ 54.799089] <DRV_ADS6311> [1970-01-01 00:01:01.196.981.490] <E> 2535 num_entries: 1, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 54.810218] <DRV_ADS6311> [1970-01-01 00:01:01.208.111.285] <E> 2509 source_pad: 0, source_stream: 2
    [ 54.819352] <DRV_ADS6311> [1970-01-01 00:01:01.217.245.075] <E> 2535 num_entries: 2, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 54.830045] <DRV_ADS6311> [1970-01-01 00:01:01.227.938.110] <E> 2509 source_pad: 0, source_stream: 3
    [ 54.839174] <DRV_ADS6311> [1970-01-01 00:01:01.237.066.930] <E> 2535 num_entries: 3, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 54.849867] cdns-csi2rx 30101000.csi-bridge: num_entries: 4, type: 2, flags: 1, stream: 0, vc*dt: 0*44;
    [ 54.849867] flags: 1, stream: 1, vc*dt: 1*44; flags: 1, stream: 2, vc*dt: 0*48; flags: 1, stream: 3, vc*dt: 1*48.
    [ 54.869497] j721e-csi2rx 30102000.ticsi2rx: num_entries: 4, i: 2, stream: 2, vc: 0.
    [ 54.877192] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_start_dma: 2.
    [ 54.883912] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_sd_enable_streams, enable_count: 0, pad: 3, streams_mask: 1.
    [ 54.894288] j721e-csi2rx 30102000.ticsi2rx: Enabling all streams (f) on sink, pad: 3, streams_mask: 1.
    [ 54.904282] cdns-csi2rx 30101000.csi-bridge: csi2rx_start: cdns_csi2rx.30101000.csi-bridge.
    [ 54.912648] <DRV_ADS6311> [1970-01-01 00:01:01.310.538.730] <E> 3365 __sensor_start_stream: 0.
    [ 54.912648]
    [ 54.945205] <DRV_ADS6311> [1970-01-01 00:01:01.343.097.075] <N> 4278 sensor_set_ctrl Unhandled id:0x9f0901, val:0x1
    [ 54.945205]
    [ 55.017734] <DRV_ADS6311> [1970-01-01 00:01:01.415.626.865] <N> 2278 ============= Register Dump from <__sensor_start_stream> Line: 3538, Power_on: Yes =============
    [ 55.032504] <DRV_ADS6311> [1970-01-01 00:01:01.430.397.245] <N> 2287 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 55.047125] <DRV_ADS6311> [1970-01-01 00:01:01.445.018.250] <N> 2313 0000: 34 00 00 00 43 49 01 01 00 00 00 0A 0A 1F F0 00
    [ 55.061774] <DRV_ADS6311> [1970-01-01 00:01:01.459.666.860] <N> 2313 0010: 16 F0 FF 00 01 03 00 A7 A8 00 00 02 00 00 00 06
    [ 55.076422] <DRV_ADS6311> [1970-01-01 00:01:01.474.315.515] <N> 2313 0020: 04 C6 14 FF 05 00 00 00 FF 03 01 00 00 00 00 F0
    [ 55.091041] <DRV_ADS6311> [1970-01-01 00:01:01.488.934.375] <N> 2313 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.105661] <DRV_ADS6311> [1970-01-01 00:01:01.503.554.585] <N> 2313 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.120295] <DRV_ADS6311> [1970-01-01 00:01:01.518.187.755] <N> 2313 0050: 00 00 00 00 D2 FF 84 04 00 DC 16 00 00 00 00 00
    [ 55.134913] <DRV_ADS6311> [1970-01-01 00:01:01.532.806.165] <N> 2313 0060: 00 10 00 11 10 10 00 00 00 81 32 FA 00 83 20 37
    [ 55.149531] <DRV_ADS6311> [1970-01-01 00:01:01.547.424.165] <N> 2313 0070: 00 00 00 00 00 54 1D 41 30 F0 00 00 00 00 0C 00
    [ 55.164152] <DRV_ADS6311> [1970-01-01 00:01:01.562.045.645] <N> 2313 0080: 00 00 00 00 00 00 00 00 00 00 21 43 65 87 09 00
    [ 55.178768] <DRV_ADS6311> [1970-01-01 00:01:01.576.661.390] <N> 2313 0090: 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 00 00
    [ 55.193387] <DRV_ADS6311> [1970-01-01 00:01:01.591.280.415] <N> 2313 00a0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00
    [ 55.208027] <DRV_ADS6311> [1970-01-01 00:01:01.605.920.430] <N> 2313 00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.222646] <DRV_ADS6311> [1970-01-01 00:01:01.620.538.990] <N> 2313 00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.237263] <DRV_ADS6311> [1970-01-01 00:01:01.635.156.655] <N> 2313 00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.251883] <DRV_ADS6311> [1970-01-01 00:01:01.649.776.385] <N> 2313 00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.265698] <DRV_ADS6311> [1970-01-01 00:01:01.663.590.950] <N> 2318 =====================================================================================
    [ 55.265698]
    [ 55.280991] <DRV_ADS6311> [1970-01-01 00:01:01.678.883.095] <N> 2278 ============= Register Dump from <__sensor_start_stream> Line: 3539, Power_on: Yes =============
    [ 55.295761] <DRV_ADS6311> [1970-01-01 00:01:01.693.654.405] <N> 2287 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 55.310397] <DRV_ADS6311> [1970-01-01 00:01:01.708.289.625] <N> 2313 0100: 8B 01 00 00 0C 10 10 24 FA 00 1F 00 05 05 00 00
    [ 55.325024] <DRV_ADS6311> [1970-01-01 00:01:01.722.916.860] <N> 2313 0110: 00 00 20 00 2C 2C 00 00 D0 02 D0 02 00 00 00 00
    [ 55.339660] <DRV_ADS6311> [1970-01-01 00:01:01.737.552.410] <N> 2313 0120: FF FF FF FF 00 00 00 00 80 00 80 00 00 00 00 00
    [ 55.354286] <DRV_ADS6311> [1970-01-01 00:01:01.752.179.480] <N> 2313 0130: 00 00 01 00 0F 40 00 30 00 00 00 00 05 00 C0 00
    [ 55.368910] <DRV_ADS6311> [1970-01-01 00:01:01.766.802.845] <N> 2313 0140: AD 00 00 00 00 00 00 00 00 00 00 00 00 05 01 00
    [ 55.383479] <DRV_ADS6311> [1970-01-01 00:01:01.781.372.180] <N> 2313 0150: C0 C0 00 00 00 00 00 00 64 0A 0A 00 01 01 00 --
    [ 55.397291] <DRV_ADS6311> [1970-01-01 00:01:01.795.183.825] <N> 2313 0160: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.411102] <DRV_ADS6311> [1970-01-01 00:01:01.808.995.225] <N> 2313 0170: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.424913] <DRV_ADS6311> [1970-01-01 00:01:01.822.806.265] <N> 2313 0180: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.438722] <DRV_ADS6311> [1970-01-01 00:01:01.836.615.380] <N> 2313 0190: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.452532] <DRV_ADS6311> [1970-01-01 00:01:01.850.425.475] <N> 2313 01a0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.466351] <DRV_ADS6311> [1970-01-01 00:01:01.864.244.550] <N> 2313 01b0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.480165] <DRV_ADS6311> [1970-01-01 00:01:01.878.058.080] <N> 2313 01c0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.493974] <DRV_ADS6311> [1970-01-01 00:01:01.891.867.325] <N> 2313 01d0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.507782] <DRV_ADS6311> [1970-01-01 00:01:01.905.675.685] <N> 2313 01e0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.521591] <DRV_ADS6311> [1970-01-01 00:01:01.919.484.365] <N> 2318 =====================================================================================
    [ 55.521591]
    [ 55.536879] <DRV_ADS6311> [1970-01-01 00:01:01.934.772.390] <N> 2278 ============= Register Dump from <__sensor_start_stream> Line: 3541, Power_on: Yes =============
    [ 55.551645] <DRV_ADS6311> [1970-01-01 00:01:01.949.538.460] <N> 2287 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 55.566274] <DRV_ADS6311> [1970-01-01 00:01:01.964.167.390] <N> 2313 0200: 30 30 30 30 10 00 00 00 00 AB 6C 3A 02 04 00 00
    [ 55.580896] <DRV_ADS6311> [1970-01-01 00:01:01.978.788.855] <N> 2313 0210: 01 14 C8 34 08 AA 33 F0 7F 55 CC 0F 80 5D 03 54
    [ 55.595528] <DRV_ADS6311> [1970-01-01 00:01:01.993.421.040] <N> 2313 0220: 64 A0 40 01 00 00 02 3C 0F 00 00 02 00 32 11 48
    [ 55.610002] <DRV_ADS6311> [1970-01-01 00:01:02.007.894.910] <N> 2313 0230: 08 A3 02 A0 64 21 84 00 00 00 00 44 00 -- -- --
    [ 55.623812] <DRV_ADS6311> [1970-01-01 00:01:02.021.705.365] <N> 2313 0240: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.637621] <DRV_ADS6311> [1970-01-01 00:01:02.035.514.115] <N> 2313 0250: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.651431] <DRV_ADS6311> [1970-01-01 00:01:02.049.324.275] <N> 2313 0260: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.665241] <DRV_ADS6311> [1970-01-01 00:01:02.063.133.885] <N> 2313 0270: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.679049] <DRV_ADS6311> [1970-01-01 00:01:02.076.942.200] <N> 2313 0280: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.692855] <DRV_ADS6311> [1970-01-01 00:01:02.090.748.875] <N> 2313 0290: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.706665] <DRV_ADS6311> [1970-01-01 00:01:02.104.558.230] <N> 2313 02a0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.720487] <DRV_ADS6311> [1970-01-01 00:01:02.118.379.785] <N> 2313 02b0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.734299] <DRV_ADS6311> [1970-01-01 00:01:02.132.192.255] <N> 2313 02c0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.748108] <DRV_ADS6311> [1970-01-01 00:01:02.146.000.880] <N> 2313 02d0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.761917] <DRV_ADS6311> [1970-01-01 00:01:02.159.809.970] <N> 2313 02e0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.775727] <DRV_ADS6311> [1970-01-01 00:01:02.173.620.355] <N> 2318 =====================================================================================
    [ 55.775727]
    [ 55.791015] <DRV_ADS6311> [1970-01-01 00:01:02.188.908.285] <N> 6759 ====================MCU Register Dump from <__sensor_start_stream> Line: 3542=====================
    [ 55.805955] <DRV_ADS6311> [1970-01-01 00:01:02.203.848.245] <N> 6768 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 55.819774] <DRV_ADS6311> [1970-01-01 00:01:02.217.666.745] <N> 6791 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.833592] <DRV_ADS6311> [1970-01-01 00:01:02.231.485.705] <N> 6791 0010: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.847418] <DRV_ADS6311> [1970-01-01 00:01:02.245.310.750] <N> 6791 0020: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.861236] <DRV_ADS6311> [1970-01-01 00:01:02.259.129.760] <N> 6791 0030: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.875052] <DRV_ADS6311> [1970-01-01 00:01:02.272.945.175] <N> 6791 0040: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.888867] <DRV_ADS6311> [1970-01-01 00:01:02.286.760.515] <N> 6791 0050: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.902682] <DRV_ADS6311> [1970-01-01 00:01:02.300.575.230] <N> 6791 0060: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.916498] <DRV_ADS6311> [1970-01-01 00:01:02.314.391.760] <N> 6791 0070: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.930312] <DRV_ADS6311> [1970-01-01 00:01:02.328.205.280] <N> 6791 0080: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.944126] <DRV_ADS6311> [1970-01-01 00:01:02.342.019.850] <N> 6791 0090: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.957944] <DRV_ADS6311> [1970-01-01 00:01:02.355.837.455] <N> 6791 00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.971768] <DRV_ADS6311> [1970-01-01 00:01:02.369.661.070] <N> 6791 00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.985587] <DRV_ADS6311> [1970-01-01 00:01:02.383.480.515] <N> 6791 00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.999425] <DRV_ADS6311> [1970-01-01 00:01:02.397.317.815] <N> 6791 00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 56.013244] <DRV_ADS6311> [1970-01-01 00:01:02.411.137.260] <N> 6791 00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 56.027061] <DRV_ADS6311> [1970-01-01 00:01:02.424.953.990] <N> 6791 00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 56.040869] <DRV_ADS6311> [1970-01-01 00:01:02.438.762.175] <N> 6796 =====================================================================================
    [ 56.040869]
    [ 56.056161] j721e-csi2rx 30102000.ticsi2rx: v4l2_subdev_enable_streams: 3.
    VIDIOC_STREAMON returned 0 (Success)
    [ 56.063694] j721e-csi2rx 30102000.ticsi2rx: Disabling all streams (f) on sink.
    cap dqbuf: 0 seq: 0 bytesused: 32 ts: 54.832158 (ts-monotonic, ts-src-eof)
    cap dqbuf: 1 seq: 1 bytesused: 32 ts: 54.834016 delta: 1.858 ms (ts-monotonic, ts-src-eof)
    [ 57.080141] ti-udma 4e230000.dma-controller: chan2 teardown timeout!

    root@am62axx-evm:~# dmesg
    [ 45.424765] videodev: v4l2_open: v4l-subdev1: open (0)
    [ 45.424820] videodev: v4l2_release: v4l-subdev1: release
    [ 45.829413] videodev: v4l2_open: v4l-subdev0: open (0)
    [ 45.829470] videodev: v4l2_release: v4l-subdev0: release
    [ 54.468102] videodev: v4l2_open: video2: open (0)
    [ 54.468183] video2: VIDIOC_QUERYCAP: driver=j721e-csi2rx, card=j721e-csi2rx, bus=platform:30102000.ticsi2rx, version=0x0006012e, capabilities=0xa4200001, device_caps=0x24200001
    [ 54.468251] video2: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
    [ 54.468334] video2: VIDIOC_TRY_EXT_CTRLS: error -25: which=0x0, count=0, error_idx=0, request_fd=0
    [ 54.468394] video2: VIDIOC_QUERYCTRL: error -25: id=0x80000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.468453] video2: VIDIOC_G_SELECTION: error -25: type=vid-cap, target=0, flags=0x0, wxh=0x0, x,y=0,0
    [ 54.468513] video2: VIDIOC_QUERYCAP: driver=j721e-csi2rx, card=j721e-csi2rx, bus=platform:30102000.ticsi2rx, version=0x0006012e, capabilities=0xa4200001, device_caps=0x24200001
    [ 54.469127] video2: VIDIOC_QUERY_EXT_CTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000, elem_size=0, elems=0, nr_of_dims=0, dims=0,0,0,0
    [ 54.469216] video2: VIDIOC_QUERYCTRL: error -25: id=0xc0000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469276] video2: VIDIOC_QUERYCTRL: error -25: id=0x980900, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469334] video2: VIDIOC_QUERYCTRL: error -25: id=0x980901, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469390] video2: VIDIOC_QUERYCTRL: error -25: id=0x980902, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469446] video2: VIDIOC_QUERYCTRL: error -25: id=0x980903, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469502] video2: VIDIOC_QUERYCTRL: error -25: id=0x980904, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469558] video2: VIDIOC_QUERYCTRL: error -25: id=0x980905, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469614] video2: VIDIOC_QUERYCTRL: error -25: id=0x980906, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469670] video2: VIDIOC_QUERYCTRL: error -25: id=0x980907, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469726] video2: VIDIOC_QUERYCTRL: error -25: id=0x980908, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469781] video2: VIDIOC_QUERYCTRL: error -25: id=0x980909, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469837] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469892] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.469948] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470003] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470059] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470114] video2: VIDIOC_QUERYCTRL: error -25: id=0x98090f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470170] video2: VIDIOC_QUERYCTRL: error -25: id=0x980910, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470225] video2: VIDIOC_QUERYCTRL: error -25: id=0x980911, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470281] video2: VIDIOC_QUERYCTRL: error -25: id=0x980912, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470337] video2: VIDIOC_QUERYCTRL: error -25: id=0x980913, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470392] video2: VIDIOC_QUERYCTRL: error -25: id=0x980914, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470448] video2: VIDIOC_QUERYCTRL: error -25: id=0x980915, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470504] video2: VIDIOC_QUERYCTRL: error -25: id=0x980916, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470561] video2: VIDIOC_QUERYCTRL: error -25: id=0x980917, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470616] video2: VIDIOC_QUERYCTRL: error -25: id=0x980918, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470671] video2: VIDIOC_QUERYCTRL: error -25: id=0x980919, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470726] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470781] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470837] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091c, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470892] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091d, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.470948] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091e, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471003] video2: VIDIOC_QUERYCTRL: error -25: id=0x98091f, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471058] video2: VIDIOC_QUERYCTRL: error -25: id=0x980920, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471114] video2: VIDIOC_QUERYCTRL: error -25: id=0x980921, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471169] video2: VIDIOC_QUERYCTRL: error -25: id=0x980922, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471225] video2: VIDIOC_QUERYCTRL: error -25: id=0x980923, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471280] video2: VIDIOC_QUERYCTRL: error -25: id=0x980924, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471336] video2: VIDIOC_QUERYCTRL: error -25: id=0x980925, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471392] video2: VIDIOC_QUERYCTRL: error -25: id=0x980926, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471447] video2: VIDIOC_QUERYCTRL: error -25: id=0x980927, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471502] video2: VIDIOC_QUERYCTRL: error -25: id=0x980928, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471558] video2: VIDIOC_QUERYCTRL: error -25: id=0x980929, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471613] video2: VIDIOC_QUERYCTRL: error -25: id=0x98092a, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471669] video2: VIDIOC_QUERYCTRL: error -25: id=0x98092b, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471725] video2: VIDIOC_QUERYCTRL: error -25: id=0x8000000, type=0, name=, min/max=0/0, step=0, default=0, flags=0x00000000
    [ 54.471800] video2: VIDIOC_G_FMT: type=vid-cap, width=640, height=480, pixelformat=UYVY little-endian (0x59565955), field=any, bytesperline=1280, sizeimage=614400, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [ 54.471917] video2: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [ 54.472060] ti_csi2rx_try_fmt_vid_cap: width*height: 40*1, pixelformat: 825770306.
    [ 54.481032] ti_csi2rx_fill_fmt: width: 40, pixels_in_word: 16, bpp: 8.
    [ 54.487584] ti_csi2rx_fill_fmt: clamp_t width: 40.
    [ 54.492387] ti_csi2rx_fill_fmt: rounddown width: 32.
    [ 54.497365] ti_csi2rx_fill_fmt: width*height: 32*1, bpp: 8, bpl: 32, pixelformat: 825770306.
    [ 54.505828] video2: VIDIOC_S_FMT: type=vid-cap, width=32, height=1, pixelformat=BA81 little-endian (0x31384142), field=none, bytesperline=32, sizeimage=32, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [ 54.506076] video2: VIDIOC_ENUM_FMT: index=0, type=vid-cap, flags=0x0, pixelformat=BA81 little-endian (0x31384142), mbus_code=0x0000, description='8-bit Bayer BGBG/GRGR'
    [ 54.506375] video2: VIDIOC_CROPCAP: error -25: type=vid-cap, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
    [ 54.506431] video2: VIDIOC_CROPCAP: error -25: type=vid-out, bounds wxh=0x0, x,y=0,0, defrect wxh=0x0, x,y=0,0, pixelaspect 0/0
    [ 54.506543] video2: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x2, id=0x0, flags=0x0
    [ 54.506570] video2: VIDIOC_SUBSCRIBE_EVENT: error -25: type=0x5, id=0x0, flags=0x0
    [ 54.506596] video2: VIDIOC_G_INPUT: value=0
    [ 54.506616] video2: VIDIOC_ENUMINPUT: index=0, name=30102000.ticsi2rx context 2, type=2, audioset=0x0, tuner=0, std=0x00000000, status=0x0, capabilities=0x0
    [ 54.506830] video2: VIDIOC_REQBUFS: count=6, type=vid-cap, memory=mmap
    [ 54.506917] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=32
    [ 54.506953] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.506998] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x1000, length=32
    [ 54.507031] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507062] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=2, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x2000, length=32
    [ 54.507094] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507124] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=3, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x3000, length=32
    [ 54.507157] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507187] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=4, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x4000, length=32
    [ 54.507219] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507250] video2: VIDIOC_QUERYBUF: 00:00:00.000000 index=5, type=vid-cap, request_fd=0, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x5000, length=32
    [ 54.507282] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507352] videodev: v4l2_mmap: video2: mmap (0)
    [ 54.507396] videodev: v4l2_mmap: video2: mmap (0)
    [ 54.507420] videodev: v4l2_mmap: video2: mmap (0)
    [ 54.507446] videodev: v4l2_mmap: video2: mmap (0)
    [ 54.507473] videodev: v4l2_mmap: video2: mmap (0)
    [ 54.507517] videodev: v4l2_mmap: video2: mmap (0)
    [ 54.507551] video2: VIDIOC_QBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x0, length=32
    [ 54.507584] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507621] video2: VIDIOC_QBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x1000, length=32
    [ 54.507654] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507686] video2: VIDIOC_QBUF: 00:00:00.000000 index=2, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x2000, length=32
    [ 54.507719] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507750] video2: VIDIOC_QBUF: 00:00:00.000000 index=3, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x3000, length=32
    [ 54.507783] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507814] video2: VIDIOC_QBUF: 00:00:00.000000 index=4, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x4000, length=32
    [ 54.507847] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507878] video2: VIDIOC_QBUF: 00:00:00.000000 index=5, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x5000, length=32
    [ 54.507911] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 54.507946] video2: VIDIOC_G_FMT: type=vid-cap, width=32, height=1, pixelformat=BA81 little-endian (0x31384142), field=none, bytesperline=32, sizeimage=32, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [ 54.512162] j721e-csi2rx 30102000.ticsi2rx: validating link "m00_dToF_ads6311 spi1.0":0:15 -> "cdns_csi2rx.30101000.csi-bridge":0:15
    [ 54.524971] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:0 -> "cdns_csi2rx.30101000.csi-bridge":0:0
    [ 54.542398] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:0 (but that's ok)
    [ 54.558253] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:1 -> "cdns_csi2rx.30101000.csi-bridge":0:1
    [ 54.575671] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:1 (but that's ok)
    [ 54.591539] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:2 -> "cdns_csi2rx.30101000.csi-bridge":0:2
    [ 54.608968] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:2 (but that's ok)
    [ 54.624835] j721e-csi2rx 30102000.ticsi2rx: validating stream "m00_dToF_ads6311 spi1.0":0:3 -> "cdns_csi2rx.30101000.csi-bridge":0:3
    [ 54.642272] j721e-csi2rx 30102000.ticsi2rx: Failed to get format for "m00_dToF_ads6311 spi1.0":0:3 (but that's ok)
    [ 54.658152] j721e-csi2rx 30102000.ticsi2rx: video_device_pipeline_start
    [ 54.670276] j721e-csi2rx 30102000.ticsi2rx: remote entity name: 30102000.ticsi2rx, remote pad index: 3, idx: 2.
    [ 54.685884] j721e-csi2rx 30102000.ticsi2rx: subdev: 30102000.ticsi2rx, num_routes: 4.
    [ 54.699240] j721e-csi2rx 30102000.ticsi2rx: subdev: 30102000.ticsi2rx, sink_pad: 0, sink_stream: 0, source_pad: 1, source_stream: 0.
    [ 54.716664] j721e-csi2rx 30102000.ticsi2rx: subdev: 30102000.ticsi2rx, sink_pad: 0, sink_stream: 1, source_pad: 2, source_stream: 0.
    [ 54.731929] j721e-csi2rx 30102000.ticsi2rx: subdev: 30102000.ticsi2rx, sink_pad: 0, sink_stream: 2, source_pad: 3, source_stream: 0.
    [ 54.743833] j721e-csi2rx 30102000.ticsi2rx: source sd name: cdns_csi2rx.30101000.csi-bridge, index: 1, stream: 2.
    [ 54.754107] cdns-csi2rx 30101000.csi-bridge: subdev: m00_dToF_ads6311 spi1.0, entity.name: cdns_csi2rx.30101000.csi-bridge, remote_pad index: 0.
    [ 54.767060] num_routes: 4
    [ 54.767066] <DRV_ADS6311> [1970-01-01 00:01:01.164.958.850] <E> 2509 source_pad: 0, source_stream: 0
    [ 54.778823] <DRV_ADS6311> [1970-01-01 00:01:01.176.715.810] <E> 2535 num_entries: 0, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 54.789956] <DRV_ADS6311> [1970-01-01 00:01:01.187.849.315] <E> 2509 source_pad: 0, source_stream: 1
    [ 54.799089] <DRV_ADS6311> [1970-01-01 00:01:01.196.981.490] <E> 2535 num_entries: 1, w*h: 2688 * 192, code: 0x3008, bpp: 16
    [ 54.810218] <DRV_ADS6311> [1970-01-01 00:01:01.208.111.285] <E> 2509 source_pad: 0, source_stream: 2
    [ 54.819352] <DRV_ADS6311> [1970-01-01 00:01:01.217.245.075] <E> 2535 num_entries: 2, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 54.830045] <DRV_ADS6311> [1970-01-01 00:01:01.227.938.110] <E> 2509 source_pad: 0, source_stream: 3
    [ 54.839174] <DRV_ADS6311> [1970-01-01 00:01:01.237.066.930] <E> 2535 num_entries: 3, w*h: 40 * 1, code: 0x3001, bpp: 8
    [ 54.849867] cdns-csi2rx 30101000.csi-bridge: num_entries: 4, type: 2, flags: 1, stream: 0, vc*dt: 0*44;
    flags: 1, stream: 1, vc*dt: 1*44; flags: 1, stream: 2, vc*dt: 0*48; flags: 1, stream: 3, vc*dt: 1*48.
    [ 54.869497] j721e-csi2rx 30102000.ticsi2rx: num_entries: 4, i: 2, stream: 2, vc: 0.
    [ 54.877192] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_start_dma: 2.
    [ 54.883912] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_sd_enable_streams, enable_count: 0, pad: 3, streams_mask: 1.
    [ 54.894288] j721e-csi2rx 30102000.ticsi2rx: Enabling all streams (f) on sink, pad: 3, streams_mask: 1.
    [ 54.904282] cdns-csi2rx 30101000.csi-bridge: csi2rx_start: cdns_csi2rx.30101000.csi-bridge.
    [ 54.912648] <DRV_ADS6311> [1970-01-01 00:01:01.310.538.730] <E> 3365 __sensor_start_stream: 0.

    [ 54.945205] <DRV_ADS6311> [1970-01-01 00:01:01.343.097.075] <N> 4278 sensor_set_ctrl Unhandled id:0x9f0901, val:0x1

    [ 55.017734] <DRV_ADS6311> [1970-01-01 00:01:01.415.626.865] <N> 2278 ============= Register Dump from <__sensor_start_stream> Line: 3538, Power_on: Yes =============
    [ 55.032504] <DRV_ADS6311> [1970-01-01 00:01:01.430.397.245] <N> 2287 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 55.047125] <DRV_ADS6311> [1970-01-01 00:01:01.445.018.250] <N> 2313 0000: 34 00 00 00 43 49 01 01 00 00 00 0A 0A 1F F0 00
    [ 55.061774] <DRV_ADS6311> [1970-01-01 00:01:01.459.666.860] <N> 2313 0010: 16 F0 FF 00 01 03 00 A7 A8 00 00 02 00 00 00 06
    [ 55.076422] <DRV_ADS6311> [1970-01-01 00:01:01.474.315.515] <N> 2313 0020: 04 C6 14 FF 05 00 00 00 FF 03 01 00 00 00 00 F0
    [ 55.091041] <DRV_ADS6311> [1970-01-01 00:01:01.488.934.375] <N> 2313 0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.105661] <DRV_ADS6311> [1970-01-01 00:01:01.503.554.585] <N> 2313 0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.120295] <DRV_ADS6311> [1970-01-01 00:01:01.518.187.755] <N> 2313 0050: 00 00 00 00 D2 FF 84 04 00 DC 16 00 00 00 00 00
    [ 55.134913] <DRV_ADS6311> [1970-01-01 00:01:01.532.806.165] <N> 2313 0060: 00 10 00 11 10 10 00 00 00 81 32 FA 00 83 20 37
    [ 55.149531] <DRV_ADS6311> [1970-01-01 00:01:01.547.424.165] <N> 2313 0070: 00 00 00 00 00 54 1D 41 30 F0 00 00 00 00 0C 00
    [ 55.164152] <DRV_ADS6311> [1970-01-01 00:01:01.562.045.645] <N> 2313 0080: 00 00 00 00 00 00 00 00 00 00 21 43 65 87 09 00
    [ 55.178768] <DRV_ADS6311> [1970-01-01 00:01:01.576.661.390] <N> 2313 0090: 00 00 00 00 00 00 0F 00 00 00 00 00 00 00 00 00
    [ 55.193387] <DRV_ADS6311> [1970-01-01 00:01:01.591.280.415] <N> 2313 00a0: 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 00
    [ 55.208027] <DRV_ADS6311> [1970-01-01 00:01:01.605.920.430] <N> 2313 00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.222646] <DRV_ADS6311> [1970-01-01 00:01:01.620.538.990] <N> 2313 00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.237263] <DRV_ADS6311> [1970-01-01 00:01:01.635.156.655] <N> 2313 00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.251883] <DRV_ADS6311> [1970-01-01 00:01:01.649.776.385] <N> 2313 00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
    [ 55.265698] <DRV_ADS6311> [1970-01-01 00:01:01.663.590.950] <N> 2318 =====================================================================================

    [ 55.280991] <DRV_ADS6311> [1970-01-01 00:01:01.678.883.095] <N> 2278 ============= Register Dump from <__sensor_start_stream> Line: 3539, Power_on: Yes =============
    [ 55.295761] <DRV_ADS6311> [1970-01-01 00:01:01.693.654.405] <N> 2287 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 55.310397] <DRV_ADS6311> [1970-01-01 00:01:01.708.289.625] <N> 2313 0100: 8B 01 00 00 0C 10 10 24 FA 00 1F 00 05 05 00 00
    [ 55.325024] <DRV_ADS6311> [1970-01-01 00:01:01.722.916.860] <N> 2313 0110: 00 00 20 00 2C 2C 00 00 D0 02 D0 02 00 00 00 00
    [ 55.339660] <DRV_ADS6311> [1970-01-01 00:01:01.737.552.410] <N> 2313 0120: FF FF FF FF 00 00 00 00 80 00 80 00 00 00 00 00
    [ 55.354286] <DRV_ADS6311> [1970-01-01 00:01:01.752.179.480] <N> 2313 0130: 00 00 01 00 0F 40 00 30 00 00 00 00 05 00 C0 00
    [ 55.368910] <DRV_ADS6311> [1970-01-01 00:01:01.766.802.845] <N> 2313 0140: AD 00 00 00 00 00 00 00 00 00 00 00 00 05 01 00
    [ 55.383479] <DRV_ADS6311> [1970-01-01 00:01:01.781.372.180] <N> 2313 0150: C0 C0 00 00 00 00 00 00 64 0A 0A 00 01 01 00 --
    [ 55.397291] <DRV_ADS6311> [1970-01-01 00:01:01.795.183.825] <N> 2313 0160: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.411102] <DRV_ADS6311> [1970-01-01 00:01:01.808.995.225] <N> 2313 0170: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.424913] <DRV_ADS6311> [1970-01-01 00:01:01.822.806.265] <N> 2313 0180: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.438722] <DRV_ADS6311> [1970-01-01 00:01:01.836.615.380] <N> 2313 0190: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.452532] <DRV_ADS6311> [1970-01-01 00:01:01.850.425.475] <N> 2313 01a0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.466351] <DRV_ADS6311> [1970-01-01 00:01:01.864.244.550] <N> 2313 01b0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.480165] <DRV_ADS6311> [1970-01-01 00:01:01.878.058.080] <N> 2313 01c0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.493974] <DRV_ADS6311> [1970-01-01 00:01:01.891.867.325] <N> 2313 01d0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.507782] <DRV_ADS6311> [1970-01-01 00:01:01.905.675.685] <N> 2313 01e0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.521591] <DRV_ADS6311> [1970-01-01 00:01:01.919.484.365] <N> 2318 =====================================================================================

    [ 55.536879] <DRV_ADS6311> [1970-01-01 00:01:01.934.772.390] <N> 2278 ============= Register Dump from <__sensor_start_stream> Line: 3541, Power_on: Yes =============
    [ 55.551645] <DRV_ADS6311> [1970-01-01 00:01:01.949.538.460] <N> 2287 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 55.566274] <DRV_ADS6311> [1970-01-01 00:01:01.964.167.390] <N> 2313 0200: 30 30 30 30 10 00 00 00 00 AB 6C 3A 02 04 00 00
    [ 55.580896] <DRV_ADS6311> [1970-01-01 00:01:01.978.788.855] <N> 2313 0210: 01 14 C8 34 08 AA 33 F0 7F 55 CC 0F 80 5D 03 54
    [ 55.595528] <DRV_ADS6311> [1970-01-01 00:01:01.993.421.040] <N> 2313 0220: 64 A0 40 01 00 00 02 3C 0F 00 00 02 00 32 11 48
    [ 55.610002] <DRV_ADS6311> [1970-01-01 00:01:02.007.894.910] <N> 2313 0230: 08 A3 02 A0 64 21 84 00 00 00 00 44 00 -- -- --
    [ 55.623812] <DRV_ADS6311> [1970-01-01 00:01:02.021.705.365] <N> 2313 0240: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.637621] <DRV_ADS6311> [1970-01-01 00:01:02.035.514.115] <N> 2313 0250: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.651431] <DRV_ADS6311> [1970-01-01 00:01:02.049.324.275] <N> 2313 0260: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.665241] <DRV_ADS6311> [1970-01-01 00:01:02.063.133.885] <N> 2313 0270: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.679049] <DRV_ADS6311> [1970-01-01 00:01:02.076.942.200] <N> 2313 0280: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.692855] <DRV_ADS6311> [1970-01-01 00:01:02.090.748.875] <N> 2313 0290: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.706665] <DRV_ADS6311> [1970-01-01 00:01:02.104.558.230] <N> 2313 02a0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.720487] <DRV_ADS6311> [1970-01-01 00:01:02.118.379.785] <N> 2313 02b0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.734299] <DRV_ADS6311> [1970-01-01 00:01:02.132.192.255] <N> 2313 02c0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.748108] <DRV_ADS6311> [1970-01-01 00:01:02.146.000.880] <N> 2313 02d0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.761917] <DRV_ADS6311> [1970-01-01 00:01:02.159.809.970] <N> 2313 02e0: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
    [ 55.775727] <DRV_ADS6311> [1970-01-01 00:01:02.173.620.355] <N> 2318 =====================================================================================

    [ 55.791015] <DRV_ADS6311> [1970-01-01 00:01:02.188.908.285] <N> 6759 ====================MCU Register Dump from <__sensor_start_stream> Line: 3542=====================
    [ 55.805955] <DRV_ADS6311> [1970-01-01 00:01:02.203.848.245] <N> 6768 ---------0----1----2----3----4----5----6----7----8----9----a----b----c----d----e----f
    [ 55.819774] <DRV_ADS6311> [1970-01-01 00:01:02.217.666.745] <N> 6791 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.833592] <DRV_ADS6311> [1970-01-01 00:01:02.231.485.705] <N> 6791 0010: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.847418] <DRV_ADS6311> [1970-01-01 00:01:02.245.310.750] <N> 6791 0020: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.861236] <DRV_ADS6311> [1970-01-01 00:01:02.259.129.760] <N> 6791 0030: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.875052] <DRV_ADS6311> [1970-01-01 00:01:02.272.945.175] <N> 6791 0040: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.888867] <DRV_ADS6311> [1970-01-01 00:01:02.286.760.515] <N> 6791 0050: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.902682] <DRV_ADS6311> [1970-01-01 00:01:02.300.575.230] <N> 6791 0060: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.916498] <DRV_ADS6311> [1970-01-01 00:01:02.314.391.760] <N> 6791 0070: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.930312] <DRV_ADS6311> [1970-01-01 00:01:02.328.205.280] <N> 6791 0080: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.944126] <DRV_ADS6311> [1970-01-01 00:01:02.342.019.850] <N> 6791 0090: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.957944] <DRV_ADS6311> [1970-01-01 00:01:02.355.837.455] <N> 6791 00a0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.971768] <DRV_ADS6311> [1970-01-01 00:01:02.369.661.070] <N> 6791 00b0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.985587] <DRV_ADS6311> [1970-01-01 00:01:02.383.480.515] <N> 6791 00c0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 55.999425] <DRV_ADS6311> [1970-01-01 00:01:02.397.317.815] <N> 6791 00d0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 56.013244] <DRV_ADS6311> [1970-01-01 00:01:02.411.137.260] <N> 6791 00e0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 56.027061] <DRV_ADS6311> [1970-01-01 00:01:02.424.953.990] <N> 6791 00f0: 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000
    [ 56.040869] <DRV_ADS6311> [1970-01-01 00:01:02.438.762.175] <N> 6796 =====================================================================================

    [ 56.056161] j721e-csi2rx 30102000.ticsi2rx: v4l2_subdev_enable_streams: 3.
    [ 56.063035] video2: VIDIOC_STREAMON: type=vid-cap
    [ 56.063128] video2: VIDIOC_G_FMT: type=vid-cap, width=32, height=1, pixelformat=BA81 little-endian (0x31384142), field=none, bytesperline=32, sizeimage=32, colorspace=8, flags=0x0, ycbcr_enc=0, quantization=0, xfer_func=0
    [ 56.063197] videodev: v4l2_poll: video2: poll: 00000041 000000fb
    [ 56.063221] video2: VIDIOC_DQBUF: 00:00:54.832158 index=0, type=vid-cap, request_fd=0, flags=0x00002001, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x0, length=32
    [ 56.063245] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 56.063424] video2: VIDIOC_QBUF: 00:00:00.000000 index=0, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x0, length=32
    [ 56.063450] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 56.063468] videodev: v4l2_poll: video2: poll: 00000041 000000fb
    [ 56.063483] video2: VIDIOC_DQBUF: 00:00:54.834016 index=1, type=vid-cap, request_fd=0, flags=0x00002001, field=any, sequence=1, memory=mmap, bytesused=32, offset/userptr=0x1000, length=32
    [ 56.063504] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 56.063638] video2: VIDIOC_QBUF: 00:00:00.000000 index=1, type=vid-cap, request_fd=0, flags=0x00002003, field=any, sequence=0, memory=mmap, bytesused=32, offset/userptr=0x1000, length=32
    [ 56.063663] timecode=00:00:00 type=0, flags=0x00000000, frames=0, userbits=0x00000000
    [ 56.063694] j721e-csi2rx 30102000.ticsi2rx: Disabling all streams (f) on sink.
    [ 57.080141] ti-udma 4e230000.dma-controller: chan2 teardown timeout!
    [ 57.089020] video2: VIDIOC_STREAMOFF: type=vid-cap
    [ 57.089111] video2: VIDIOC_STREAMOFF: type=vid-cap
    [ 57.089429] video2: VIDIOC_REQBUFS: count=0, type=vid-cap, memory=mmap
    [ 57.089649] videodev: v4l2_release: video2: release

  • Hi Jianzhong,

        Please also help confirm a question. Is the following configuration supported?
    video0 corresponds to data from vc0, dt=0x2c, video1 corresponds to data from vc1, dt=0x2c, video2 corresponds to data from vc0, dt=0x30, video3 corresponds to data from vc1, dt=0x30

  • Hi Qingfeng,

    video0 corresponds to data from vc0, dt=0x2c, video1 corresponds to data from vc1, dt=0x2c, video2 corresponds to data from vc0, dt=0x30, video3 corresponds to data from vc1, dt=0x30

    Yes, this configuration is supported by the CSI-Rx driver for AM62A.

    Regards,

    Jianzhong

  • Hi Jianzhong,

        Could you please help me analyze this issue?

  • Hi Jianzhong,

        A brief description of the problem is: setting the resolution of 40*1, the function ti_csi2rx_fill_fmt executes the statement "pix->width = rounddown(pix->width, pixels_in_word);" and the resulting pix->width size is 32, which is not as expected.

  • Hi Jianzhong,

        The following is the print I added in the function ti_csi2rx_start_dma:

         desc = dmaengine_prep_slave_single(ctx->dma.chan, addr, len,
    					   DMA_DEV_TO_MEM,
    					   DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
    +	printk("ti_csi2rx_start_dma: len = %d.\n", len);
    	if (!desc)
    		return -EIO;

        The 32-byte image size in the format matches the length set in dma:

  • Hi Qingfeng,

    I'll need to check internally about this. Did you get the video nodes created properly for the combinations of VC and data type?

    Regards,

    Jianzhong

  • Hi Jianzhong,

        The following is the mapping relationship and related commands:

    VC DT Bayer format videoX subdev route 启动流命令
    0 0x2c V4L2_PIX_FMT_SBGGR12 0 media-ctl -d /dev/media0 -R "'cdns_csi2rx.30101000.csi-bridge' [0/0 -> 1/0 [1], 0/1 -> 1/1 [1], 0/2 -> 1/2 [1], 0/3 -> 1/3 [1]]"
    media-ctl -d /dev/media0 -R "'30102000.ticsi2rx' [0/0 -> 1/0 [1], 0/1 -> 2/0 [1], 0/2 -> 3/0 [1], 0/3 -> 4/0 [1]]"
    v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=480,height=128,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/480x128_SBGGR12_1X12_VC0.raw12 --stream-count=2 --stream-poll
    0x30 V4L2_PIX_FMT_SBGGR8 2 v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=10 --stream-poll
    1 0x2c V4L2_PIX_FMT_SBGGR12 1 v4l2-ctl --verbose -d /dev/video1 --set-fmt-video=width=480,height=128,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/480x128_SBGGR12_1X12_VC1.raw12 --stream-count=2 --stream-poll
    0x30 V4L2_PIX_FMT_SBGGR8 3 v4l2-ctl --verbose -d /dev/video3 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC1.raw8 --stream-count=2 --stream-poll
  • Hi Jianzhong,

        The log pasted in this commit has all operations integrated into it.Judging from the test, as long as video2 or video3 is started, the following key print will appear:

        [ 57.080141] ti-udma 4e230000.dma-controller: chan2 teardown timeout!

        When starting video0 and video1, the above printed information will not appear.

  • Hello Qingfeng,

    Please note that 40x1 resolution with raw 8-bit is not supported by the CSI-2 Rx driver. This may be the root cause of the issue.

    Regards,

    Jianzhong

  • Hello Qingfeng,

    As we communicated offline, the following patch has removed the restriction of 16-byte aligned transfer from the CSI-2 Rx driver and resolved your issue.

    diff --git a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
    index e5bcd8423dc5d..c2c1f477c40ae 100644
    --- a/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
    +++ b/drivers/media/platform/ti/j721e-csi2rx/j721e-csi2rx.c
    @@ -328,7 +328,9 @@ static void ti_csi2rx_fill_fmt(const struct ti_csi2rx_fmt *csi_fmt,
            pix->width = clamp_t(unsigned int, pix->width,
                                 pixels_in_word,
                                 MAX_WIDTH_BYTES * 8 / bpp);
    -       pix->width = rounddown(pix->width, pixels_in_word);
    +       // HACK: Allow non-16-aligned width
    +       /*pix->width = rounddown(pix->width, pixels_in_word);*/
    +       /*pix->bytesperline = ALIGN(bpl, 16);*/
    
            pix->height = clamp_t(unsigned int, pix->height, 1, MAX_HEIGHT_LINES);
    
    @@ -338,7 +340,6 @@ static void ti_csi2rx_fill_fmt(const struct ti_csi2rx_fmt *csi_fmt,
            pix->sizeimage = pix->height * pix->width * (bpp / 8);
    
            bpl = (pix->width * ALIGN(bpp, 8)) >> 3;
    -       pix->bytesperline = ALIGN(bpl, 16);
     }
    
     static int ti_csi2rx_querycap(struct file *file, void *priv,
    @@ -454,7 +455,8 @@ static int ti_csi2rx_enum_framesizes(struct file *file, void *fh,
            fsize->stepwise.min_width = pixels_in_word;
            fsize->stepwise.max_width = rounddown(MAX_WIDTH_BYTES * 8 / bpp,
                                                  pixels_in_word);
    -       fsize->stepwise.step_width = pixels_in_word;
    +       // HACK: Set step width to 1 to allow non-16 aligned transfers
    +       fsize->stepwise.step_width = 1;
            fsize->stepwise.min_height = 1;
            fsize->stepwise.max_height = MAX_HEIGHT_LINES;
            fsize->stepwise.step_height = 1; 

    I'll close this ticket.

    Regards,

    Jianzhong

  • Hi Jianzhong,

        Attached is the test log after I merged the patch on the 4G DDR board.

        1. The following log can confirm that the patch modification to the ti_csi2rx_enum_framesizes function is effective:
    root@am62axx-evm:/tmp# v4l2-ctl --verbose -d /dev/video0 --list-framesizes='BA81'
    VIDIOC_QUERYCAP: OK
    ioctl: VIDIOC_ENUM_FRAMESIZES
    Size: Stepwise 16x1 - 16384x16384 with step 1/1
        2. The following log confirms that the board is 4G DDR:
    root@am62axx-evm:/tmp# free
    total used free shared buff/cache available
    Mem: 3836648 114588 3606380 10128 115680 3583716
    Swap: 0 0 0
        3. The following log can confirm that the modification of the patch to the ti_csi2rx_fill_fmt function is effective:
    [ 195.752580] ti_csi2rx_try_fmt_vid_cap: width*height: 40*1, V4L2_PIX_FMT_SBGGR8: 825770306, pixelformat: 825770306.
    [ 195.763380] ti_csi2rx_fill_fmt: width: 40, pixels_in_word: 16, bpp: 8.
    [ 195.771417] ti_csi2rx_fill_fmt: clamp_t width: 40.
    [ 195.776210] ti_csi2rx_fill_fmt: width*height: 40*1, bpp: 8, bpl: 40, pixelformat: 825770306.
    [ 196.203012] ti_csi2rx_start_dma: len = 40.
        4. However, after using the following command to start video2, "[148.826505] ti-udma 4e230000.dma-controller: chan2 teardown timeout!" still exists when stopping.
    v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream -to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=10 --stream-poll
    When I start video3 later, no frames are received.

    Operation records and corresponding logs.rar

  • Hi Jianzhong,
        The current problem focuses on two errors:
        1. When opening video0 or video1 alone, the following error will appear when stopping:
    [2493.222632] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [2493.230313] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus
    [2493.241768] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_stop_streaming: 1.
        2. When starting video2, the following error will appear:
    [ 2511.962468] ti-udma 4e230000.dma-controller: chan2 teardown timeout!
    [2511.975155] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_stop_streaming: 2.
        3. After video2 capture is completed, when video3 is started again, the frame cannot be output, and the error printed when timeout stops is the same as 1:
    [2528.366638] j721e-csi2rx 30102000.ticsi2rx: DMA transfer timed out for drain buffer
    [2528.374319] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_cleanup_buffers: Failed: -110 to drain DMA. Next frame might be bogus
    [2528.385771] j721e-csi2rx 30102000.ticsi2rx: ti_csi2rx_stop_streaming: 3.
        4. The biggest suspicion is still the problem of register configuration.

  • Hi Jianzhong,
        Below is the added debugging print information, which can be found in the log.
        1.cdns module related register printing information:
    [ 2524.763944] cdns-csi2rx 30101000.csi-bridge: csi2rx->max_streams: 4, cur stream: 0, cfg reg addr: 0xa0e110c, value: 0x100, data reg addr: 0xa0e1108, value: 0x0.

        2.When stopped, the relevant registers of the cdns module print information:
    [ 2528.204266] cdns-csi2rx 30101000.csi-bridge: csi2rx_stop: 4, cur stream: 0, ctrl reg addr: 0xa0e1100, value: 0x2, status reg addr: 0xa0e1104, value: 0x0.

        3.The j721e module SHIM_DMACNTX register prints information:
    [2524.723979] j721e-csi2rx 30102000.ticsi2rx: ctx->idx: 3, size: 0, reg addr: 0x9c01080, value: 0x80000070.

  • Hi Qingfeng,

    We'll be looking into the debug data and get back to you early next week.

    Thanks for your patience.

    Jianzhong

  • Hi Jianzhong,

        1.Use the following command (running capture in the background) to start 4 video capture tests at the same time. It is found that all 4 videos can capture data. There will be no problem that video3 cannot capture frames after starting video2:
    v4l2-ctl --verbose -d /dev/video0 --set-fmt-video=width=480,height=128,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/480x128_SBGGR12_1X12_VC0.raw12 --stream-count=200 --stream-poll &
    v4l2-ctl --verbose -d /dev/video1 --set-fmt-video=width=480,height=128,pixelformat='BG12' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/480x128_SBGGR12_1X12_VC1.raw12 --stream-count=200 --stream-poll &
    v4l2-ctl --verbose -d /dev/video2 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC0.raw8 --stream-count=200 --stream-poll &
    v4l2-ctl --verbose -d /dev/video3 --set-fmt-video=width=40,height=1,pixelformat='BA81' --stream-mmap=6 --stream-skip=1 --stream-to=/tmp/40x1_SBGGR8_1X8_VC1.raw8 --stream-count=200 --stream-poll &

        2.This means that 40×1 data can be captured, but when video2 and video3 are stopped, the following printout will still appear:
    [ 371.418344] ti-udma 4e230000.dma-controller: chan3 teardown timeout!
    [ 371.738351] ti-udma 4e230000.dma-controller: chan2 teardown timeout!

    ti_am62a7_serial_ti_am62ax_serial_2024-03-13_12_10_28.rar

  • Hi Jianzhong,

        Looking at the code, this is just a warning, and there should be no problem: