<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><br>
><br>
> Current MM:<br>
> 1. drm_gem_cma_object, only support contiguous memory<br>
<br>
</div></div>Please note that drm_gem_cma_object only looks at memory after the MMU<br>
has done the mapping. If you have a good IOMMU driver that registers<br>
correctly the dma_ops then you can allocate memory from anywhere and<br>
still import it into the lima driver via drm_gem_cma_prime_import_sg_<wbr>table()<br>
hook attached to the gem_prime_import_sg_table.<br></blockquote><div>Thanks, good to know this. But some Mali400/450 SoC doesn't have IOMMU</div><div>at all, so I can't rely on it.</div><div><br></div><div>Regards,</div><div>Qiang</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class=""><br>
> 3. buffer is not really allocated when GEM_CREATE, but in CPU<br>
> page fault handler and task submit buffer validation which make<br>
> sure no GPU page fault<br>
> 4. in shrinker handler, free un-used page in the pool, if still not<br>
> enough, swap some idle buffer to disk<br>
><br>
> 3&4 apply to both dma_alloc buffer and alloc_page buffer.<br>
><br>
> Thanks,<br>
> Qiang<br>
<br>
</span><span class="">> ______________________________<wbr>_________________<br>
> dri-devel mailing list<br>
> <a href="mailto:dri-devel@lists.freedesktop.org">dri-devel@lists.freedesktop.<wbr>org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/dri-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/dri-devel</a><br>
<br>
<br>
</span>--<br>
/`\<br>
/ : |<br>
_.._ | '/<br>
/` \ | /<br>
| .-._ '-"` (<br>
|_/ / o o\<br>
| == () ==<br>
\ -- / ______________________________<wbr>________<br>
/ ---<_ ________| |_______<br>
| \\ \ | I would like to fix the world but | /<br>
| | \\__ \ | no one gives me the source code. | /<br>
/ ; |.__) / |_____________________________<wbr>_________| \<br>
(_/.-. ; /__________) (_________\<br>
{ `| \_/<br>
'-\ / |<br>
| / |<br>
/ \ '-.<br>
\__|-----'<br>
</blockquote></div><br></div></div>