Basler MIPI CSI not detecting

Hello,

I am trying to get a Basler Dart daA3840 CSI Camera connected and working with the MIPI CSI port on the iMX8 M Plus SOM. I have built the imx-image-full in yocto using Gatesgarth successfully. At runtime I am receiving some errors coming after loading the basler_camera_driver_vvcam kernel module

[    7.406198] i2c_transfer() failed: -6
[    7.409890] basler_read_register_chunk() failed: -6
[    7.414791] basler_read_register() failed: -6

When I try to run one of the simple examples with pypylon The code is unable to detect any camera instances. Here is a snippet of what I am running. Nothing is printed in the output.

from pypylon import pylon


tl_factory = pylon.TlFactory.GetInstance()
devices = tl_factory.EnumerateDevices()
for device in devices:
    print(device.GetFriendlyName())

I have also attempted to access the camera through OpenCV and I am receiving the following dimes prints

[  881.648266] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[  881.658522] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[  882.854179] enter viv_isp_exit_module
[  882.857897] enter isp_hw_remove
[  882.890438] enter viv_dwe_exit_module
[  882.894151] enter dwe_hw_remove
[  882.897522] vvcam dewarp driver removed
[  882.939871] : Unregistered all entities
[  883.047189] i2c_transfer() failed: -6
[  883.050881] basler_read_register_chunk() failed: -6
[  883.055869] basler_read_register() failed: -6
[  883.096649] imx8_media_dev: module is from the staging directory, the quality is unknown, you have been warned.
[  883.156339] enter viv_dwe_init_module
[  883.160318] enter dwe_hw_probe
[  883.163846] vvcam dewarp driver probed
[  883.206355] enter viv_isp_init_module
[  883.210412] enter isp_hw_probe
[  883.219844] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[  883.230151] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[  883.240740] vvcam isp driver registered
[  886.776558] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[  886.792166] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[  886.807685] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[  886.823155] cma: cma_alloc: alloc failed, req-size: 4050 pages, ret: -12
[  886.838825] unsupported dwe command 259
[  886.838833] unsupported dwe command 260

That BSP contained a bug in the Basler device connected to the MIPI CSI port used on the SOM. I believe that is fixed in the most recent BSP. I will post a link to a test image. Sorry about the confusion.

1 Like

Sounds great. If you could also provide a link to the fix I can patch it in. Thanks!

Checking in to see if you have discovered a pending fix in the BSP. I saw some commits regarding the MIPI clock speed in the 5.4.x 2.3.0 BSP but no references to the 5.10 branch.

Hello,

I still have an issue with Basler Dart daA3840 CSI Camera with the latest image.
Where I can find a fixed image?

This has been fixed in our latest Yocto BSP that will be released this week. The initial kernel code has been posted here, GitHub - SolidRun/linux-stable at lf-5.10.72-2.2.0-sr. I am still working on fine tuning the memory allocations for the 1GB SOM variants.

Thank you

Can you share tunning memory results for 1GB memory?
I guess you are talking about VVCAM, ISP_REG_BASE and ISP_REG_BASE in version.h?

Those settings are all specific to the device and won’t change. I am mostly working to tweak the Linux kernel settings for CMA memory allocation that are used for allocating large contiguous buffers that are used primarily by the multimedia subsystems.

My 1GB Module perfectly works with the camera. It seems the configuration was done correctly. Can you point me to the source tree with these settings?
Thank you

This is done in the device-tree file for the board. You can see the memory node that is dedicated to cma.