TI E2E Community
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.
Refer this link for setting the appropriate bootargs,
All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.
TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs andembedded processors, along with software, tools and the industry’s largest sales/support staff.