AnsweredAssumed Answered

dma_alloc_coherent fails on large images

Question asked by Pierre-Olivier Huard on Sep 21, 2017
Latest reply on Sep 21, 2017 by Pierre-Olivier Huard

Hello,

I'm currently on a Sony IMX MIPI sensor, the sensor is fully working with the iMX6: I can have a 1080p,720p video and I can grab 13MPX images from the sensor.

 

My issue is appearing when I try to grab multiple times a 13MPix image. It seems to appear randomly.

 

This is my pipeline:

gst-launch-1.0 imxv4l2videosrc num-buffers=1 ! filesink location=test.raw

 

When it's working:

root@mx6:~# gst-launch-1.0 imxv4l2videosrc num-buffers=1 ! filesink location=test.raw
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:01.949798667
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

When I have the error :

 

gst-launch-1.0 imxv4l2videosrc num-buffers=1 ! filesink location=test.raw
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

[ 381.520560] ERROR: v4l2 capture : Allocate dummy frame failed.
ERROR: from element /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0: Internal data stream error.
Additional debug info:
../../../../gstreamer-1.10.4/libs/gst/base/gstbasesrc.c(2950): gst_base_src_loop (): /GstPipeline:pipeline0/GstImxV4l2VideoSrc:imxv4l2videosrc0:
streaming stopped, reason not-negotiated (-4)
Execution ended after 0:00:00.599205333
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

 

This is my tries to solve this issue, but with no success:

- Add __GFP_NOFAIL in the flags of the dma_alloc_coherent generation this issue

- Change CONFIG_FORCE_MAX_ZONEORDER to 16 instead of 15

- Increase CMA size to 512MB (instead of 320)

 

I understand that the image is huge (4192*3104) but it worked in parallel CSI with this resolution.

 

I'm on Yocto 2.3.1 (Pyro) and my kernel version is 4.1.15.

 

Did you ever face this issue?

Thank You,

Pierre-Olivier

Outcomes