RFC: unpinned DMA-buf exporting

Daniel Vetter daniel at ffwll.ch
Mon Mar 12 17:24:01 UTC 2018


On Fri, Mar 09, 2018 at 08:11:40PM +0100, Christian K??nig wrote:
> This set of patches adds an option invalidate_mappings callback to each
> DMA-buf attachment which can be filled in by the importer.
> 
> This callback allows the exporter to provided the DMA-buf content
> without pinning it. The reservation objects lock acts as synchronization
> point for buffer moves and creating mappings.
> 
> This set includes an implementation for amdgpu which should be rather
> easily portable to other DRM drivers.

Bunch of higher level comments, and one I've forgotten in reply to patch
1:

- What happens when a dma-buf is pinned (e.g. i915 loves to pin buffers
  for scanout)?

- pulling the dma-buf implementations into amdgpu makes sense, that's
  kinda how it was meant to be anyway. The gem prime helpers are a bit too
  much midlayer for my taste (mostly because nvidia wanted to bypass the
  EXPORT_SYMBOL_GPL of core dma-buf, hooray for legal bs). We can always
  extract more helpers once there's more ttm based drivers doing this.

Overall I like, there's some details to figure out first.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the amd-gfx mailing list