i.MX 8QM MEK - MCIMXCAMERA1MP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX 8QM MEK - MCIMXCAMERA1MP

731 Views
Vlongobardi
Contributor II

Hello to everyone,

I followed this guide to configure and use the camera: https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8-Camera-Use-Cases/ta-p/1117352

But when I ran the gst pipeline I got a memory error.

Since we have only one camera MCIMXCAMERA1MP and a MX8XMIPI4CAM2 board we used fsl-imx8qm-mek.dtb file. We used a Linux L4.14.78_1.0.0-GA Image and followed all the steps on the document.

This is the output of: v4l2-ctl --list-devices

vpu B0 (platform:):
/dev/video12
/dev/video13

mxc-isi (platform:58100000.isi.0):
/dev/video4

mxc-jpeg decoder (platform:58400000.jpegdec):
/dev/video5

mxc-jpeg decoder (platform:58450000.jpegenc):
/dev/video6


This is the output of: gst-launch-1.0 v4l2src device=/dev/video4 ! video/x-raw,width=640,height=480 ! fakesink, with debug level set to warnings.

Setting pipeline to PAUSED ...
0:00:00.124460474  4352     0x28581350 WARN                    v4l2 v4l2_calls.c:543:gst_v4l2_subscribe_event:<v4l2src0> Cannot subscribe V4L2_EVENT_SOURCE_CHANGE or V4L2_EVENT_EOS event for device '/dev/video4'.
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
0:00:00.126209510  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

New clock: GstSystemClock
0:00:00.126310262  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.126442140  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.126554768  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.126650895  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.126711146  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.126801148  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.126870524  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.126959651  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.127018527  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.127109154  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.127168030  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.127257282  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.127318784  4352     0x285bcc00 WARN                    v4l2 gstv4l2object.c:1986:gst_v4l2_object_get_interlace_mode: Driver bug detected - check driver with v4l2-compliance from http://git.linuxtv.org/v4l-utils.git

0:00:00.141462079  4352     0x285bcc00 WARN          v4l2bufferpool gstv4l2bufferpool.c:794:gst_v4l2_buffer_pool_start:<v4l2src0:pool:src> Uncertain or not enough buffers, enabling copy threshold
0:00:00.148871484  4352     0x285bcc00 ERROR         v4l2bufferpool gstv4l2bufferpool.c:677:gst_v4l2_buffer_pool_streamon:<v4l2src0:pool:src> error with STREAMON 22 (Invalid argument)
0:00:00.148962860  4352     0x285bcc00 ERROR             bufferpool gstbufferpool.c:564:gst_buffer_pool_set_active:<v4l2src0:pool:src> start failed
0:00:00.149031612  4352     0x285bcc00 WARN                 v4l2src gstv4l2src.c:650:gst_v4l2src_decide_allocation:<v4l2src0> error: Failed to allocate required memory.
0:00:00.149090863  4352     0x285bcc00 WARN                 v4l2src gstv4l2src.c:650:gst_v4l2src_decide_allocation:<v4l2src0> error: Buffer pool activation failed
0:00:00.149320368  4352     0x285bcc00 WARN                 basesrc gstbasesrc.c:3275:gst_base_src_prepare_allocation:<v4l2src0> Subclass failed to decide allocation
0:00:00.149423870  4352     0x285bcc00 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: Internal data stream error.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate required memory.
0:00:00.149483621  4352     0x285bcc00 WARN                 basesrc gstbasesrc.c:3055:gst_base_src_loop:<v4l2src0> error: streaming stopped, reason not-negotiated (-4)
Additional debug info:
../../../git/sys/v4l2/gstv4l2src.c(650): gst_v4l2src_decide_allocation (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Buffer pool activation failed
Execution ended after 0:00:00.023417114
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...


From dmesg log:

mxc_isi_capture_open, No remote pad found!

 

Any help is appreciated,
Regards.

0 Kudos
Reply
4 Replies

657 Views
Vlongobardi
Contributor II

Hi,

thank you for your help.

I tried with that pipeline and it didn't work. Do you have further suggests?

Regards

0 Kudos
Reply

580 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Sorry for the late reply,

After looking into this use case I noticed the following. For only 1 camera sensor up and running, it looks like the only option that works is when connecting the OV10635 camera to IN0 port from Maxim MAX9286 adapter board.

Looking at the logs:

root@imx8qmmek:~# dmesg | grep mipi
[ 2.780425] mxc-mipi-csi2 58227000.csi: mipi_csi2_probe
[ 2.822521] max9286_mipi 7-006a: In max9286_hardware_preinit()
[ 3.118500] max9286_mipi: reg = 0x10.
[ 3.122182] max9286_mipi: sensor number = 1.
[ 3.126462] max9286_mipi 7-006a: In max9286_hardware_init()
[ 3.158015] max9286_mipi: initialized sensor = 0x01.
[ 3.165208] max9286_mipi 7-006a: ov10635_check_device: OV10635 index=1 was found.
[ 3.172723] max9286_mipi 7-006a: ov10635_initialize: index = 0.
[ 5.046355] max9286_mipi 7-006a: max9286_mipi is found, name max9286_mipi 7-006a
[ 5.086175] mx8-img-md: Registered sensor subdevice: max9286_mipi 7-006a (1)
[ 5.099858] mx8-img-md: created link [mxc-mipi-csi2.0] => [mxc_isi.0]
[ 5.112931] mx8-img-md: created link [mxc-mipi-csi2.0] => [mxc_isi.1]
[ 5.126009] mx8-img-md: created link [mxc-mipi-csi2.0] => [mxc_isi.2]
[ 5.139092] mx8-img-md: created link [mxc-mipi-csi2.0] => [mxc_isi.3]
[ 5.145551] mx8-img-md: created link [max9286_mipi 7-006a] => [mxc-mipi-csi2.0]

Which means one sensor was found on port 0, but since the dtb enables all 4 isi instances for 4 virtual channel, it creates links for every isi instances, even though only one has the sensor connected.

root@imx8qmmek:~# v4l2-ctl --list-devices
vpu B0 (platform:):
/dev/video12
/dev/video13

mxc-isi (platform:58100000.isi.0):
/dev/video0
/dev/video4

mxc-isi (platform:58110000.isi.1):
/dev/video1

mxc-isi (platform:58120000.isi.2):
/dev/video2

mxc-isi (platform:58130000.isi.3):
/dev/video3

From this output we understand camera 0 is linked to /dev/video0, while /dev/video4 most probably be the isi instance for m2m device.

With the following command I can see the camera output on the display connected to 8QM MEK:

gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640, height=480 ! waylandsink window-width=640 window-height=480 
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 686.272076] bypass csc
[ 686.274475] input fmt YUV4
[ 686.277183] output fmt YUYV
^Chandling interrupt.
Interrupt: Stopping pipeline ...
Execution ended after 0:00:04.365057375
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Total showed frames (91), playing for (0:00:04.365252750), fps (20.846).
Freeing pipeline ...

Let me know if you can replicate,

Regards,

0 Kudos
Reply

715 Views
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

Does it also not work with autovideosink?

$ gst-launch-1.0 v4l2src device=/dev/videoX ! autovideosink

Regards

0 Kudos
Reply

655 Views
Vlongobardi
Contributor II

Hi,

thank you for your help.

I tried with that pipeline and it didn't work. Do you have further suggests?

Regards

0 Kudos
Reply