hi<div>Sorry donot describe clearly.<div><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">>>How do you allocate CMA memory from userspace</span><br></div><div> memory is allocated by userland then pass the size to kernel space </div>
<div> </div><div>I mean that we can split two parts of memory heap .one for the kernel space and other for userland app. we can use <span style="white-space:pre-wrap">dma_declare_contiguous to declare one dma device A and B .Then the all </span><span style="font-family:arial,sans-serif;font-size:12.727272033691406px">kernel driver allocate from A .The other B allocate for userland </span></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 22 November 2012 21:52, Tomi Valkeinen <span dir="ltr"><<a href="mailto:tomi.valkeinen@ti.com" target="_blank">tomi.valkeinen@ti.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<div><br>
On 2012-11-21 16:22, Jello huang wrote:<br>
> HI Tomi,<br>
> we need one rank of cma to allocate the memory for driver in kernel<br>
> space .And the default CMA is for allocating memory frome usespace.So<br>
> if we allocate the memory from the<br>
> default CMA zone ,there maybe introduce fragmention to the default CMA<br>
> zone.The kernel space memory donot touch the memory from userspace<br>
<br>
</div>Can you elaborate a bit? I didn't understand your point. Are you saying<br>
each kernel driver that uses dma_alloc should have their own CMA zone?<br>
That doesn't make sense...<br>
<br>
How do you allocate CMA memory from userspace?<br>
<span><font color="#888888"><br>
Tomi<br>
<br>
<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>Thanks<div>Jello Huang</div><br>
</div>