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.

http://e2e.ti.com/support/embedded/linux/f/354/p/addpost.aspx#

So I'm trying to understand all the details for capturing at least 3 MPix video (2048x1536) on my Leopardboard 368 (AKA DM368). I'm working with the mt9p031 imager for now until the AR0331 image becomes available. For interfacing with the imager I'm using the v4l2 ioctl calls directly as the DMAI Capture_* interface doesn't appear to be setup to work with non-standard video formats, otherwise I'm trying to stick to DMAI as much as I can. 

I've discovered that if I try to use driver allocated buffers the driver will generally fail to create more than 1 or 2 memory mapped buffers if the buffer size (i.e. YUV420 capture size Width X Height *1.5) is greater than about 4mB.  The error I get is "vpfe-capture vpfe-capture:  dma_alloc_coherent size 4718592 failed" on the third buffer (I'm trying to create 4 buffers)

This occurs regardless of the value to assign to vpfe_capture.cont_bufsize, I've gone as high as 23mb which should be more than enough to hold 4 buffers of the required size. 

Before I go any further and explain what I did get to work, I'd like to ask why is this failing? 
I read the thread at http://e2e.ti.com/support/embedded/linux/f/354/t/93678.aspx which leads me to believe that it might have something to do with DMA_CONSISTENT_SIZE which is set to 14<<20 (14mB) which makes some sense but I'm not sure, the thread was never answered. If anyone can fill me in I'd like to know.

Now on to what I did get to work.

I simply switched to user allocated buffers and used the BufTab_* interface to create the necessary graphics buffers, this uses CMEM pools now everything appears to be working fine. I had to configure CMEM with the extra pool buffers of the required size and I set vpfe_capture.cont_bufsize to 0 to save memory. 

So is there anything wrong with going this route, I had always assumed it would be better to go with driver allocated buffers but if I can't get them to work I'll have to go this route. 

Thanks in advance for any information. 

Matt S.

  • Hi Matthew,

    Refer this link for setting the appropriate bootargs,

    https://www.ridgerun.com/developer/wiki/index.php/DM365_LeopardBoard_network_video_streaming_latency_test

    https://www.ridgerun.com/developer/wiki/index.php/DM36x_-_Drivers_and_Kernel_Documentation

    Thx,

    --Prabhakar