<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"><span class=""><br>
><br>
> My requirement:<br>
> 1. support non-contiguous memory allocation as GPU buffer<br>
> 2. support contiguous memory allocation too for exporting to some<br>
> display DRM driver as framebuffer<br>
<br>
</span>btw, I think etnaviv deals w/ contiguous scanout buffer by just<br>
importing the scanout buffer from the other display drm driver. So I<br>
think you could avoid having to allocate these buffers.<br><br></blockquote><div>Right, after looking at the renderonly lib of imx+etnaviv, it create dumb</div><div>buffer at display DRM and export to etnaviv. With this method, seems</div><div>lima just need to support non-contiguous memory allocation.</div><div><br></div><div>Thanks,</div><div>Qiang</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div class="h5"><br>
> 3. no GPU page fault for better performance and avoid multi MMU<br>
> page fault handling, CPU page fault is OK<br>
> 4. better have buffer swap to disk feature when memory is full<br>
><br>
> Current MM:<br>
> 1. drm_gem_cma_object, only support contiguous memory<br>
> 2. drm_gem_get_pages<br>
> 1) need to combine with cma method for contiguous memory<br>
> 2) when shrink is needed, swap some idle buffer to disk and put<br>
> pages, need implement by myself<br>
> 3) additional shmem layer introduced<br>
> 3. TTM TTM_PL_SYSTEM only<br>
> 1) no contiguous memory support<br>
> 2) too complicated as we don't need other functions of TTM<br>
> 3) need GPU page fault to populate memory?<br>
> 4) no page pool for cached memory<br>
><br>
> My plan:<br>
> 1. for contiguous memory allocation use dma_alloc_*<br>
> 2. for non-contiguous memory allocation, use a page pool from<br>
> alloc_page<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>
><br>
</div></div>> ______________________________<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>
</blockquote></div><br></div></div>