Part Number: SK-AM62A-LP
Tool/software:
Hi,
We are currently developing the driver for the OS02C10 sensor on the SK-AM62A-LP starter kit. Using the register settings recommended by the Omnivision team, we have successfully probed and initialized the camera sensor over the I2C interface.
As we proceed to capture a basic stream using a GStreamer pipeline, we are encountering memory allocation issues, which are detailed below.
1. Probe and Init of camera sensor
# dmesg | grep os02c10. [ 5.793944] os02c10 4-0036: OS02C10 sensor probed successfully-changed [ 5.821344] os02c10 4-0036: Silicon revision: 0x2000 [ 5.925110] os02c10 4-0036: OS02C10 initialized successfully
2. dmesg on csi2
# dmesg | grep csi [ 1.173903] i2c 4-0036: Fixed dependency cycle(s) with /bus@f0000/ticsi2rx@30102000/csi-bridge@30101000 [ 8.254321] cdns-csi2rx 30101000.csi-bridge: Probed CSI2RX with 4/4 lanes, 4 streams, external D-PHY
3. Device Detection
# v4l2-ctl --list-devices j721e-csi2rx (platform:30102000.ticsi2rx): /dev/video3 /dev/video4 /dev/video5 /dev/video6 /dev/video7 /dev/video8 /dev/media0 e5010 (platform:e5010): /dev/video1 wave5-dec (platform:wave5-dec): /dev/video0 wave5-enc (platform:wave5-enc): /dev/video2
# media-ctl -p -d /dev/media0
Media controller API version 6.1.46
Media device information
------------------------
driver 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, 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]
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
-> "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/640x480 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "os02c10 4-0036":0 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 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: os02c10 4-0036 (1 pad, 1 link, 0 route)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[stream:0 fmt:SBGGR10_1X10/1920x1080 field:none colorspace:srgb]
-> "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/video3
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/video4
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/video5
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/video6
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/video7
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/video8
pad0: Sink
<- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
4. Format settings
# media-ctl -d /dev/media0 -V "'os02c10 4-0036':0 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -d /dev/media0 -V "'cdns_csi2rx.30101000.csi-bridge':0 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -d /dev/media0 -V "'cdns_csi2rx.30101000.csi-bridge':1 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -d /dev/media0 -V "'30102000.ticsi2rx':0 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -d /dev/media0 -V "'30102000.ticsi2rx':1 [fmt:SBGGR10_1X10/1920x1080]"
# media-ctl -p -d /dev/media0
Media controller API version 6.1.46
Media device information
------------------------
driver 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, 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:SBGGR10_1X10/1920x1080]
<- "cdns_csi2rx.30101000.csi-bridge":1 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:SBGGR10_1X10/1920x1080]
-> "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:SBGGR10_1X10/1920x1080]
<- "os02c10 4-0036":0 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:SBGGR10_1X10/1920x1080]
-> "30102000.ticsi2rx":0 [ENABLED,IMMUTABLE]
pad2: Source
pad3: Source
pad4: Source
- entity 15: os02c10 4-0036 (1 pad, 1 link, 0 route)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev2
pad0: Source
[stream:0 fmt:SBGGR10_1X10/1920x1080 field:none colorspace:srgb]
-> "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/video3
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/video4
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/video5
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/video6
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/video7
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/video8
pad0: Sink
<- "30102000.ticsi2rx":6 [ENABLED,IMMUTABLE]
5. gst-launch streaming issue
# v4l2-ctl -d /dev/video3 \ > --set-fmt-video=width=1920,height=1080,pixelformat=BA10 \ > --stream-mmap --stream-count=1 --stream-to=test.raw VIDIOC_STREAMON returned -1 (No such file or directory)
# GDEBUG=0 gst-launch-1.0 v4l2src device=/dev/video3 ! video/x-bayer, width=1920, height=1080, format=bggr ! bayer2rgb ! videoconvert ! video/x-raw, format=RGB16, width=1920, height=1080 ! kmssink driver-name=tidss sync=false 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: ../gst-plugins-good-1.20.7/sys/v4l2/gstv4l2src.c(777): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Buffer pool activation failed Execution ended after 0:00:00.076110248 Setting pipeline to NULL ... ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream error. Additional debug info: ../gstreamer-1.20.7/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: streaming stopped, reason not-negotiated (-4) Freeing pipeline ...
What is the issue causing this memory allocation failure? Is it related to format conversion?
Looking forward for your guidance on resolving this.
Thanks in Advance.

