On Sat, Dec 14, 2013 at 7:47 AM, Thomas Hellstrom <thomas@xxxxxxxxxxxx> wrote:On 12/14/2013 01:37 PM, Thierry Reding wrote:yeah, or some way for importers to opportunistically keep around aOn Thu, Dec 12, 2013 at 11:30:23PM +0100, Daniel Vetter wrote:On Thu, Dec 12, 2013 at 8:34 PM, Thomas Hellstrom <thellstrom@xxxxxxxxxx>Shouldn't this work by simply calling the GEM_CLOSE IOCTL on the handle
wrote:
On 12/12/2013 03:36 PM, Thierry Reding wrote:Atm there's no way to get gpus to unbind their dma-buf mappings, soThis is a simple test module that can be used to allocate, export andLooks nice. I wonder whether this could be extended to create a
delete DMA-BUF objects. It can be used to test DMA-BUF sharing in
systems that lack a real second driver.
"streaming"
dma-buf from a user space mapping. That could be used as a generic way
to
implement streaming (user) buffer objects, rather than to add explicit
support for those in, for example, TTM.
their essentially pinned forever from first use on.
returned by drmPrimeFDToHandle()? I mean that should drop the last
reference on the GEM object and cause it to be cleaned up (which should
include detaching the DMA-BUF).
Actually, while the GEM prime implementation appears to pin an exported
dma-buf on first attach, from the dma-buf documentation it seems sufficient
to pin it on map or cpu access.
But what I assume Daniel is referring to is that there is no way for
exporters to tell importers to force unmap() the dma-buf, so that it can be
unpinned?
mapping rather than map/unmap on each use..
maybe we need something shrinker-ish for dmabuf?
--
BR,
-R