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.

SK-AM62P-LP: gst-launch-1.0 Failed to allocate required memory.

Part Number: SK-AM62P-LP
Other Parts Discussed in Thread: AM62P,

Tool/software:

Hi,

We were trying to enable a camera in our board. we were following the procedures on https://software-dl.ti.com/processor-sdk-linux/esd/AM62PX/10_00_07_04/exports/docs/linux/Foundational_Components/Kernel/Kernel_Drivers/Camera/CSI2RX.html , our device tree can be seeing bellow.

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// SPDX-License-Identifier: GPL-2.0
/*
* Device Tree file for the AM62P5-SK
* Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
*
* Schematics: https://www.ti.com/lit/zip/sprr487
*/
/dts-v1/;
#include <dt-bindings/leds/common.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/net/ti-dp83867.h>
#include "k3-am62p5.dtsi"
/ {
compatible = "ti,am62p5-sk", "ti,am62p5";
model = "Texas Instruments AM62P5 SK - Cameras - Teste Link 4";
aliases {
serial0 = &wkup_uart0;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


After that we tryed to configure our pipeline and configure our video


Output when we ran "media-ctl -p"

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@am62pxx-evm:/# media-ctl -p
Media controller API version 6.6.32
Media device information
------------------------
driver j721e-csi2rx
model TI-CSI2RX
serial
bus info platform:30102000.ticsi2rx
hw revision 0x1
driver version 6.6.32
Device topology
- entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:UYVY8_1X16/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


our gst-launch-1.0 output

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
root@am62pxx-evm:/# systemctl stop weston
Stopping 'weston.service', but its triggering units are still active:
weston.socket
root@am62pxx-evm:/# gst-launch-1.0 v4l2src device="/dev/video4" ! video/x-raw, width=1920, height=1080, format=UYVY ! queue ! kmssink driver-name=tidss plane-properties=s,zpos=1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
Additional debug info:
/usr/src/debug/gstreamer1.0-plugins-good/1.22.12/sys/v4l2/gstv4l2src.c(950): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.011807240
Setting pipeline to NULL ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
Additional debug info:
/usr/src/debug/gstreamer1.0/1.22.12/libs/gst/base/gstbasesrc.c(3134): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
Freeing pipeline ...
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Please, anyone knows if is there anything that we were missing?

BR

  • Hello,

    Your sensor " nvp6324_mipi 4-0033" format is different from other entities in the media pipe. Please refer to this FAQ for trouble shooting:

    What are the common reasons V4L2 based applications fail to capture images from a probed CSI sensor?

    Regards,

    Jianzhong

  • Hello Jianzhong Xu,

    Thank you for your quick response.

    I have ran the followings commands as indicated in the link you sent me

    Fullscreen
    1
    2
    3
    4
    5
    media-ctl -V '"nvp6324_mipi 4-0033":0 [fmt:UYVY8_1X16/1920x1080 field:none]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:UYVY8_1X16/1920x1080 field:none]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":1 [fmt:UYVY8_1X16/1920x1080 field:none]'
    media-ctl -V '"30102000.ticsi2rx":0 [fmt:UYVY8_1X16/1920x1080 field:none]'
    media-ctl -V '"30102000.ticsi2rx":1 [fmt:UYVY8_1X16/1920x1080 field:none]'
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Now my "media-ctl -p" output is:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@am62pxx-evm:/# media-ctl -p
    Media controller API version 6.6.32
    Media device information
    ------------------------
    driver
    j721e-csi2rx
    model TI-CSI2RX
    serial
    bus info platform:30102000.ticsi2rx
    hw revision 0
    x1
    driver version 6.6.32
    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
    type V4L2 subdev subtype Unknown flags 0
    device node name /dev/v4l-subdev0
    routes:
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    and our gst-launch output now is :

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    root@am62pxx-evm:/# GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=100 ! queue ! videocrop top=1000 left=200 right=100 bottom=0 ! video/x-raw,format=UYVY,framerate=30/1,wi
    dth=1920,height=1080 ! videoconvert ! kmssink
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    0:00:00.229965665 1352 0xffff88000d00 WARN v4l2 gstv4l2object.c:4666:gst_v4l2_object_get_crop_rect:<v4l2src0:src> VIDIOC_CROPCAP failed
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    0:00:00.231778725 1352 0xffff88000d00 WARN basesrc gstbasesrc.c:3134:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
    0:00:00.231829285 1352 0xffff88000d00 WARN basesrc gstbasesrc.c:3134:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
    Additional debug info:
    /usr/src/debug/gstreamer1.0/1.22.12/libs/gst/base/gstbasesrc.c(3134): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming stopped, reason not-negotiated (-4)
    Execution ended after 0:00:00.001478560
    Setting pipeline to NULL ...
    Freeing pipeline ...
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    this error is related to VIDIOC_CROPCAP?

    BR,

  • Can you try if the following works?

    Fullscreen
    1
    GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=100 ! queue ! video/x-raw,format=UYVY,framerate=30/1,width=1920,height=1080 ! kmssink driver-name=tidss force-modesetting=true
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX



  • here is the output for the command

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    root@am62pxx-evm:/# GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video2 num-buffers=100 ! queue ! video/x-raw,format=UYVY,framerate=30/1,width=1920,height=1080 ! kmssink driver-name=tidss
    force-modesetting=true
    0:00:00.111605515 1092 0x31e764a0 WARN kmssink gstkmssink.c:2101:_validate_and_set_external_fd:<kmssink0> Can't set fd... driver-name already set.
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    0:00:00.116732780 1092 0xffff8c000d00 WARN v4l2 gstv4l2object.c:4666:gst_v4l2_object_get_crop_rect:<v4l2src0:src> VIDIOC_CROPCAP failed
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    0:00:00.117691755 1092 0xffff8c000d00 WARN basesrc gstbasesrc.c:3134:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
    0:00:00.117748540 1092 0xffff8c000d00 WARN basesrc gstbasesrc.c:3134:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
    New clock: GstSystemClock
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
    Additional debug info:
    /usr/src/debug/gstreamer1.0/1.22.12/libs/gst/base/gstbasesrc.c(3134): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming stopped, reason not-negotiated (-4)
    Execution ended after 0:00:00.000697930
    Setting pipeline to NULL ...
    0:00:00.118567380 1092 0x31e764a0 ERROR kmssink gstkmssink.c:1250:gst_kms_sink_stop:<kmssink0> Failed to restore previous CRTC mode: Permission denied
    Freeing pipeline ...
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Ok. Can you try to do just a CSI capture?

    v4l2-ctl -d2 --stream-mmap

  • Hi, here is the output

    root@am62pxx-evm:~# v4l2-ctl -d2 --stream-mmap
    [ 3682.459075] j721e-csi2rx 30102000.ticsi2rx: Width does not match (source 1280, sink 640)
    VIDIOC_STREAMON returned -1 (Broken pipe)

  • Please try the following before running "v4l2-ctl -d2 --stream-mmap":

    v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 0" -v width=1920,height=1080,pixelformat=UYVY

  • Hi, here is the output

    root@am62pxx-evm:~# v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 0" -v width=1920,height=1080,pixelformat=UYVY
    root@am62pxx-evm:~# v4l2-ctl -d2 --stream-mmap
    [ 70.111756] j721e-csi2rx 30102000.ticsi2rx: Width does not match (source 1280, sink 1920)
    VIDIOC_STREAMON returned -1 (Broken pipe)

  • Hello Sergio,

    It's Thanksgiving holiday for the rest of the week in US. I'll get back to you next week.

    Thanks,

    Jianzhong

  • Ok, happy thanksgiving, I'll be waiting for your message

    I've ran the command "v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 0" -v width=1280,height=720,pixelformat=UYVY " changing the width and height and got the following output when ran the "v4l2-ctl -d2 --stream-mmap" command.


    Fullscreen
    1
    2
    3
    4
    root@am62pxx-evm:/# v4l2-ctl -z platform:30102000.ticsi2rx -d "30102000.ticsi2rx context 0" -v width=1280,height=720,pixelformat=UYVY
    root@am62pxx-evm:/# v4l2-ctl -d2 --stream-mmap
    [ 174.694724] cdns-csi2rx 30101000.csi-bridge: Failed to find stream from source frame desc
    VIDIOC_STREAMON returned -1 (Broken pipe)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Can you try the following:

    Fullscreen
    1
    2
    3
    4
    5
    media-ctl -V '"nvp6324_mipi 4-0033":0 [fmt:UYVY8_1X16/1920x1080 field:none]'
    media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:UYVY8_1X16/1920x1080 field:none]'
    media-ctl -V '"30102000.ticsi2rx":0 [fmt:UYVY8_1X16/1920x1080 field:none]'
    yavta -s 1920x1080 -f UYVY /dev/video3 -c5 -Fimage-#.yuv
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi, here is the output

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@am62pxx-evm:~# media-ctl -V '"nvp6324_mipi 5-0033":0 [fmt:UYVY8_1X16/1280x720 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:UYVY8_1X16/1280x720 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"30102000.ticsi2rx":0 [fmt:UYVY8_1X16/1280x720 field:none]'
    root@am62pxx-evm:~# yavta -s 1280x720 -f UYVY /dev/video2 -c5 -Fimage-#.yuv
    Device /dev/video2 opened.
    Device `j721e-csi2rx' on `platform:30102000.ticsi2rx' (driver 'j721e-csi2rx') supports video, capture, without mplanes.
    Video format set: UYVY (59565955) 1280x720 (stride 2560) field none buffer size 1843200
    Video format: UYVY (59565955) 1280x720 (stride 2560) field none buffer size 1843200
    8 buffers requested.
    length: 1843200 offset: 0 timestamp type/source: mono/EoF
    Buffer 0/0 mapped at address 0xffff86a3e000.
    length: 1843200 offset: 1843200 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xffff8687c000.
    length: 1843200 offset: 3686400 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xffff866ba000.
    length: 1843200 offset: 5529600 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xffff864f8000.
    length: 1843200 offset: 7372800 timestamp type/source: mono/EoF
    Buffer 4/0 mapped at address 0xffff86336000.
    length: 1843200 offset: 9216000 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at address 0xffff86174000.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Jianzhong Xu, any news on this ?

  • Hello Sergio,

    Sorry for my late response. I did some testing using an OV5640 camera on my end. Specifying width and height in "v4l2-ctl --stream-mmap" worked fine for me :

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    root@am62pxx-evm:~# media-ctl -V '"ov5640 4-003c":0 [fmt:UYVY8_1X16/1920x1080@1/30 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:UYVY8_1X16/1920x1080 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"30102000.ticsi2rx":0 [fmt:UYVY8_1X16/1920x1080 field:none]'
    root@am62pxx-evm:~# v4l2-ctl -d2 --stream-mmap
    [ 474.707579] j721e-csi2rx 30102000.ticsi2rx: Width does not match (source 1920, sink 640)
    VIDIOC_STREAMON returned -1 (Broken pipe)
    root@am62pxx-evm:~# v4l2-ctl -d2 --set-fmt-video=width=1920,height=1080,pixelformat='UYVY' --stream-mmap
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33.75 fps
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33.75 fps
    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 33.75 fps
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    In addition, kmssink may have an issue in SDK 10.0 for AM62P. Using waylandsink works for me:

    Fullscreen
    1
    2
    3
    4
    5
    root@am62pxx-evm:~# systemctl stop weston
    root@am62pxx-evm:~# media-ctl -V '"ov5640 4-003c":0 [fmt:YUYV8_1X16/1920x1080@1/30 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:YUYV8_1X16/1920x1080 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"30102000.ticsi2rx":0 [fmt:YUYV8_1X16/1920x1080 field:none]'
    root@am62pxx-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1920,height=1080,format=YUY2 ! waylandsink
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Please try this on your side.

    Regards,

    Jianzhong

  • Hi, thank you for your response,

    doing the test with v4l2-ctl, I got the following output

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    root@am62pxx-evm:/# v4l2-ctl -d2 --set-fmt-video=width=1280,height=720,pixelformat='UYVY' --stream-mmap
    [ 314.378014] cdns-csi2rx 30101000.csi-bridge: Failed to start streams 0x1 on subdev
    [ 314.400147] cdns-csi2rx 30101000.csi-bridge: Failed to stop streaming on pad0
    [ 314.421736] cdns-csi2rx 30101000.csi-bridge: Failed to stop streaming on pad1
    [ 314.438925] cdns-csi2rx 30101000.csi-bridge: Failed to stop streaming on pad2
    [ 314.456075] cdns-csi2rx 30101000.csi-bridge: Failed to stop streaming on pad3
    VIDIOC_STREAMON returned -1 (Operation not supported)
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    And for the second test I have the following output

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@am62pxx-evm:/# systemctl stop weston
    Stopping 'weston.service', but its triggering units are still active:
    weston.socket
    root@am62pxx-evm:/# gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1280,height=720,format=YUY2 ! waylandsink
    [ 899.053517] audit: type=1006 audit(906.544:31): pid=1120 uid=0 old-auid=4294967295 auid=1000 tty=tty7 old-ses=4294967295 ses=8 res=1
    [ 899.070756] audit: type=1300 audit(906.544:31): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=fffff24f0538 a2=4 a3=1 items=0 ppid=1 pid=1120 auid=1000 uid=0 gid=0 euid=0 suid=0 fsu)
    [ 899.096867] audit: type=1327 audit(906.544:31): proctitle="(sleep)"
    [ 901.147742] audit: type=1006 audit(908.636:32): pid=1125 uid=0 old-auid=4294967295 auid=1000 tty=tty7 old-ses=4294967295 ses=9 res=1
    [ 901.159916] audit: type=1300 audit(908.636:32): arch=c00000b7 syscall=64 success=yes exit=4 a0=8 a1=ffffe0de4008 a2=4 a3=1 items=0 ppid=1 pid=1125 auid=1000 uid=0 gid=0 euid=0 suid=0 fsu)
    [ 901.185936] audit: type=1327 audit(908.636:32): proctitle="(weston)"
    Pipeline is live and does not need PREROLL ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
    Additional debug info:
    /usr/src/debug/gstreamer1.0/1.22.12/libs/gst/base/gstbasesrc.c(3134): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    streaming stopped, reason not-negotiated (-4)
    Execution ended after 0:00:00.005586825
    Setting pipeline to NULL ...
    Freeing pipeline ...
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Can you share the "medai-ctl -p" output?

  • Hi here is the output

    root@am62pxx-evm:~# media-ctl -p
    Media controller API version 6.6.32[   90.109587] Sergio nvp6324_get_fmt


    Media device information
    ------------------------
    driver          j721e-csi2rx
    model           TI-CSI2RX
    serial          
    bus info        platform:30102000.ticsi2rx
    hw revision     0x1
    driver version  6.6.32

    Device topology
    - entity 1: 30102000.ticsi2rx (7 pads, 7 links, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev0
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
            [stream:0 fmt:UYVY8_1X16/1280x720 field:none]
                    <- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
            pad1: Source
                    [stream:0 fmt:UYVY8_1X16/1280x720 field:none]
                    -> "30102000.ticsi2rx context 0":0 [ENABLED,IMMUTABLE]
            pad2: Source
                    -> "30102000.ticsi2rx context 1":0 [ENABLED,IMMUTABLE]
            pad3: Source
                    -> "30102000.ticsi2rx context 2":0 [ENABLED,IMMUTABLE]
            pad4: Source
                    -> "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, 1 route)
                type V4L2 subdev subtype Unknown flags 0
                device node name /dev/v4l-subdev1
            routes:
                    0/0 -> 1/0 [ACTIVE]
            pad0: Sink
                    [stream:0 fmt:UYVY8_1X16/1280x720 field:none]
                    <- "nvp6324_mipi 5-0033":0 [ENABLED,IMMUTABLE]
                    [stream:0 fmt:UYVY8_1X16/1280x720 field:none]
                    -> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
            pad2: Source
    pad3: Source
            pad4: Source

    - entity 15: nvp6324_mipi 5-0033 (4 pads, 1 link, 0 routes)
                 type V4L2 subdev subtype Sensor flags 0
                 device node name /dev/v4l-subdev2
            pad0: Source
                    [stream:0 fmt:UYVY8_1X16/1280x720 field:none
                     crop.bounds:(0,0)/1280x720
                     crop:(0,0)/1280x720]
                    -> "cdns_csi2rx.30101000.csi-bridge":0 [ENABLED,IMMUTABLE]
            pad1: Source
            pad2: Source
            pad3: Source

    - entity 24: 30102000.ticsi2rx context 0 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video2
            pad0: Sink
                    <- "30102000.ticsi2rx":1 [ENABLED,IMMUTABLE]

    - entity 30: 30102000.ticsi2rx context 1 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video3
            pad0: Sink
                    <- "30102000.ticsi2rx":2 [ENABLED,IMMUTABLE]

    - entity 36: 30102000.ticsi2rx context 2 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video4
            pad0: Sink
                    <- "30102000.ticsi2rx":3 [ENABLED,IMMUTABLE]

    - entity 42: 30102000.ticsi2rx context 3 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video5
            pad0: Sink
                    <- "30102000.ticsi2rx":4 [ENABLED,IMMUTABLE]

    - entity 48: 30102000.ticsi2rx context 4 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video6
            pad0: Sink
                    <- "30102000.ticsi2rx":5 [ENABLED,IMMUTABLE]

    - entity 54: 30102000.ticsi2rx context 5 (1 pad, 1 link)
                 type Node subtype V4L flags 0
                 device node name /dev/video7
            pad0: Sink
                    <- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]

  • Navigating on the kernel, I've found an error on

    int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad, u64 streams_mask)

    in my debugs, I'm entering in this if

    if (!sd->ops->pad || !sd->ops->pad->enable_streams){
    printk("LOG %s -> %d ", __func__, __LINE__);
    return v4l2_subdev_enable_streams_fallback(sd, pad,
    streams_mask);
    }

    how do I verify if "sd->ops->pad->enable_streams" is being set on my driver?

  • Your media pipe has "UYVY8_1X16" but you're using "YUY2" in your gst pipeline:

    gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1280,height=720,format=YUY2 !  waylandsink

    Please try:

    Fullscreen
    1
    gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1280,height=720,format=UYVY ! ticolorconvert ! video/x-raw,width=1280,height=720,format=NV12 ! waylandsink
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi,

    when I ran this command, it shows the following warn

    WARNING: erroneous pipeline: no element "ticolorconvert"


    here is all the commands that i ran before gst-launch

    root@am62pxx-evm:~# media-ctl -V '"nvp6324_mipi 5-0033":0 [fmt:UYVY8_1X16/1280x720@1/60 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":0 [fmt:UYVY8_1X16/1280x720 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"cdns_csi2rx.30101000.csi-bridge":1 [fmt:UYVY8_1X16/1280x720 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"30102000.ticsi2rx":0 [fmt:UYVY8_1X16/1280x720 field:none]'
    root@am62pxx-evm:~# media-ctl -V '"30102000.ticsi2rx":1 [fmt:UYVY8_1X16/1280x720 field:none]'
    root@am62pxx-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1280,height=720,format=UYVY ! ticolorconvert ! video/x-raw,width=1280,height=720,format=NV12 ! waylandsik


  • Gst plugin ticolorconvert is available on AM62P SDK 10.0:

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    root@am62pxx-evm:~# gst-inspect-1.0 ticolorconvert
    Factory Details:
    Rank none (0)
    Long-name TI Color Convert
    Klass Filter/Converter/Video
    Description Converts video from one colorspace to another using the ARM Neon Kernels
    Author Abhay Chirania <a-chirania@ti.com>
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Can you try "videoconvert" instead of "ticolorconvert"?

  • Hi,

    here is the output

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@am62pxx-evm:~# gst-inspect-1.0 ticolorconvert
    No such element or plugin 'ticolorconvert'
    root@am62pxx-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1280,height=720,format=UYVY ! videoconvert ! video/x-raw,width=1280,height=720,format=NV12 ! waylandsink
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mo
    de=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)120/1, interlace-mode=(string)progressive, format=(string)NV12, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)120/1, interlace-mode=(string)progressive, format=(string)NV12, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)120/1, interlace-mode=(string)progressive, format=(string)NV12, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)120/1, interlace-mode=(string)progressive, format=(string)NV12, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
    Additional debug info:
    /usr/src/debug/gstreamer1.0-plugins-good/1.22.12/sys/v4l2/gstv4l2src.c(950): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Buffer pool activation failed
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • I've rerun the command with GST_DEBUG=3 flag, here is the output

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@am62pxx-evm:~# GST_DEBUG=3 gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1280,height=720,format=UYVY ! videoconvert ! video/x-raw,width=1280,height=720,format=NV12 ! waylandsink
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    0:00:00.450276050 1252 0xffff80000b70 WARN v4l2 gstv4l2object.c:4666:gst_v4l2_object_get_crop_rect:<v4l2src0:src> VIDIOC_CROPCAP failed
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)120/1, interlace-mode=(string)progressive, format=(string)NV12, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)120/1, interlace-mode=(string)progressive, format=(string)NV12, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)120/1, interlace-mode=(string)progressive, format=(string)NV12, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, framerate=(fraction)120/1, interlace-mode=(string)progressive, format=(string)NV12, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstVideoConvert:videoconvert0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    0:00:00.455870350 1252 0xffff80000b70 WARN v4l2 gstv4l2object.c:4666:gst_v4l2_object_get_crop_rect:<v4l2src0:src> VIDIOC_CROPCAP failed
    0:00:00.948193815 1252 0xffff80000b70 ERROR v4l2bufferpool gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool0:src> error with STREAMON 32 (Broken pipe)
    0:00:00.948265960 1252 0xffff80000b70 ERROR bufferpool gstbufferpool.c:572:gst_buffer_pool_set_active:<v4l2src0:pool0:src> start failed
    0:00:00.948314355 1252 0xffff80000b70 WARN v4l2src gstv4l2src.c:950:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to allocate required memory.
    0:00:00.948346445 1252 0xffff80000b70 WARN v4l2src gstv4l2src.c:950:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer pool activation failed
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Is there any patch to update SDK from 9.02 to 10.0?

  • So you are using SDK 9.02? I thought you were using 10.0 based on your initial post.

    No, there is no patch to update SDK  9.2 to 10.0.

  • Also, were you able to run this camera with TI's EVM: SK-AM62P-LP.

  • No, i couldn't run this camera.

  • Can you try SDK 10.0 and SK-AM62P-LP?

  • sure, we will start the migration today.

  • Hi, we have done the migration

    when we executed the command
    gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1280,height=720,format=UYVY ! ticolorconvert ! video/x-raw,width=1280,height=720,format=NV12 ! waylandsik

    Bellow is the output for that command

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@am62pxx-evm:~# gst-launch-1.0 -v v4l2src device=/dev/video2 ! video/x-raw,width=1280,height=720,format=UYVY ! ticolorconvert ! video/x-raw,width=1280,height=720,format=NV12 ! waylandsink
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstTIColorConvert:ticolorconvert0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)120/1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)120/1
    /GstPipeline:pipeline0/GstWaylandSink:waylandsink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)120/1
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)1280, height=(int)720, framerate=(fraction)120/1
    /GstPipeline:pipeline0/GstTIColorConvert:ticolorconvert0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw, width=(int)1280, height=(int)720, format=(string)UYVY, framerate=(fraction)120/1, interlace-mode=(string)progressive, colorimetry=(string)bt709
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
    Additional debug info:
    /usr/src/debug/gstreamer1.0-plugins-good/1.22.12/sys/v4l2/gstv4l2src.c(950): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Buffer pool activation failed
    Execution ended after 0:00:00.638075040
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error.
    Setting pipeline to NULL ...
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


  • I did another test with kmssink and I have this output

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    root@am62pxx-evm:~# GST_DEBUG=3 gst-launch-1.0 v4l2src device=/dev/video2 io-mode=dmabuf ! video/x-raw,format=UYVY,framerate=30/1,width=1280,height=720 ! kmssink driver-name=tidss force-modesetting=true
    0:00:00.295093490 1092 0xfcc0a30 WARN kmssink gstkmssink.c:2101:_validate_and_set_external_fd:<kmssink0> Can't set fd... driver-name already set.
    Setting pipeline to PAUSED ...
    Pipeline is live and does not need PREROLL ...
    0:00:00.301503335 1092 0xffff84000b70 WARN v4l2 gstv4l2object.c:4666:gst_v4l2_object_get_crop_rect:<v4l2src0:src> VIDIOC_CROPCAP failed
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    0:00:00.326406760 1092 0xffff84000b70 WARN v4l2 gstv4l2object.c:4666:gst_v4l2_object_get_crop_rect:<v4l2src0:src> VIDIOC_CROPCAP failed
    0:00:00.968445680 1092 0xffff84000b70 ERROR v4l2bufferpool gstv4l2bufferpool.c:714:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool0:src> error with STREAMON 32 (Broken pipe)
    0:00:00.968583340 1092 0xffff84000b70 ERROR bufferpool gstbufferpool.c:572:gst_buffer_pool_set_active:<v4l2src0:pool0:src> start failed
    0:00:00.968645295 1092 0xffff84000b70 WARN v4l2src gstv4l2src.c:950:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to allocate required memory.
    0:00:00.968749640 1092 0xffff84000b70 WARN v4l2src gstv4l2src.c:950:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer pool activation failed
    ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
    Additional debug info:
    /usr/src/debug/gstreamer1.0-plugins-good/1.22.12/sys/v4l2/gstv4l2src.c(950): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
    Buffer pool activation failed
    Execution ended after 0:00:00.667132335
    0:00:00.969525010 1092 0xffff84000b70 WARN basesrc gstbasesrc.c:3354:gst_base_src_pSetting pipeline to NULL ...
    repare_allocation:<v4l2src0> Subclass failed to decide allocation
    0:00:00.969653455 1092 0xffff84000b70 WARN basesrc gstbasesrc.c:3134:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX