<div dir="ltr">I think this discussion should help you:<div><br></div><div><a href="http://e2e.ti.com/support/embedded/linux/f/354/t/89419.aspx" target="_blank">http://e2e.ti.com/support/embedded/linux/f/354/t/89419.aspx</a><br>
</div><div><br></div><div style>other failures:</div><div style><br></div><div style><a href="http://stackoverflow.com/questions/14625919/allocating-a-large-dma-buffer">http://stackoverflow.com/questions/14625919/allocating-a-large-dma-buffer</a><br>
</div><div><br></div><div style>and some guideline here:</div><div style><br></div><div style><a href="https://www.kernel.org/doc/Documentation/DMA-API.txt">https://www.kernel.org/doc/Documentation/DMA-API.txt</a><br></div>
<div style><br></div><div>
<a href="https://lkml.org/lkml/2011/3/25/19">https://lkml.org/lkml/2011/3/25/19</a><br></div><div><br></div><div style>As I don't have any specific crashdump or error information, nothing I can comment further about your problem. It is quite difficult to make general comment.</div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jan 3, 2014 at 7:20 AM, Steven Bell <span dir="ltr"><<a href="mailto:botsnlinux@gmail.com" target="_blank">botsnlinux@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi,<br><br></div><div>I'm working on a device driver for a video device which continuously reads and writes image frames using DMA. The frames are fairly large, in the range of 2-8MB, and I would like the buffers for them to be contiguous because of my hardware. My understanding is that using the contiguous memory allocator is the current "right way" to get the buffers, and that CMA operates entirely behind the scenes when calls are made to dma_alloc_coherent().<br>
</div><div><br></div><div>However, it seems that for this system, a streaming DMA setup would be more appropriate. The buffer gets filled with data once, handed to the device, and then isn't touched again until it gets reused with new data. The resources I've read have hinted that streaming DMA has some performance benefits over coherent DMA, so this seems like the way to go. But I haven't seen any discussion of how to use CMA with streaming DMA (or whether such a thing is even necessary).<br>
<br></div><div>Does the CMA also work behind get_free_pages, or other kernel memory allocation methods? Does it matter? The kernel newbies page on memory allocation (<a href="http://kernelnewbies.org/KernelMemoryAllocation" target="_blank">http://kernelnewbies.org/KernelMemoryAllocation</a>) says that get_free_pages up to about 8MB are ok. Is that a generalization based on typical memory fragmentation, or a guarantee?<br>
</div><div><br></div><div>Thanks,</div>Steven<br></div>
<br>_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>Regards,<br>Peter Teoh
</div>