All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hellstrom <thomas@shipmail.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>
Subject: Re: [RFC] dma-buf: Implement test module
Date: Sat, 14 Dec 2013 13:47:41 +0100	[thread overview]
Message-ID: <52AC536D.70901@shipmail.org> (raw)
In-Reply-To: <20131214123709.GE17467@mithrandir>

On 12/14/2013 01:37 PM, Thierry Reding wrote:
> On Thu, Dec 12, 2013 at 11:30:23PM +0100, Daniel Vetter wrote:
>> On Thu, Dec 12, 2013 at 8:34 PM, Thomas Hellstrom <thellstrom@vmware.com> wrote:
>>> On 12/12/2013 03:36 PM, Thierry Reding wrote:
>>>> This is a simple test module that can be used to allocate, export and
>>>> delete DMA-BUF objects. It can be used to test DMA-BUF sharing in
>>>> systems that lack a real second driver.
>>>>
>>>>
>>> Looks nice. I wonder whether this could be extended to create a "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.
>> Atm there's no way to get gpus to unbind their dma-buf mappings, so
>> their essentially pinned forever from first use on.
> Shouldn't this work by simply calling the GEM_CLOSE IOCTL on the handle
> 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?

Daniel, maybe you could elaborate a bit on this?

Thomas

>
> Thierry
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: Thomas Hellstrom <thomas@shipmail.org>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: Daniel Vetter <daniel@ffwll.ch>,
	"linaro-mm-sig@lists.linaro.org" <linaro-mm-sig@lists.linaro.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Thomas Hellstrom <thellstrom@vmware.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: [RFC] dma-buf: Implement test module
Date: Sat, 14 Dec 2013 13:47:41 +0100	[thread overview]
Message-ID: <52AC536D.70901@shipmail.org> (raw)
In-Reply-To: <20131214123709.GE17467@mithrandir>

On 12/14/2013 01:37 PM, Thierry Reding wrote:
> On Thu, Dec 12, 2013 at 11:30:23PM +0100, Daniel Vetter wrote:
>> On Thu, Dec 12, 2013 at 8:34 PM, Thomas Hellstrom <thellstrom@vmware.com> wrote:
>>> On 12/12/2013 03:36 PM, Thierry Reding wrote:
>>>> This is a simple test module that can be used to allocate, export and
>>>> delete DMA-BUF objects. It can be used to test DMA-BUF sharing in
>>>> systems that lack a real second driver.
>>>>
>>>>
>>> Looks nice. I wonder whether this could be extended to create a "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.
>> Atm there's no way to get gpus to unbind their dma-buf mappings, so
>> their essentially pinned forever from first use on.
> Shouldn't this work by simply calling the GEM_CLOSE IOCTL on the handle
> 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?

Daniel, maybe you could elaborate a bit on this?

Thomas

>
> Thierry
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel



  reply	other threads:[~2013-12-14 12:48 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 14:36 [RFC] dma-buf: Implement test module Thierry Reding
2013-12-12 14:36 ` Thierry Reding
2013-12-12 14:42 ` Thierry Reding
2013-12-12 14:42   ` Thierry Reding
2013-12-13  2:02   ` Greg Kroah-Hartman
2013-12-14 12:32     ` Thierry Reding
2013-12-14 12:32       ` Thierry Reding
2014-03-25 16:17     ` Thierry Reding
2014-03-25 18:01       ` Sam Ravnborg
2014-03-26  8:32         ` Thierry Reding
2014-03-26  8:32           ` Thierry Reding
2014-07-10  9:55           ` Thierry Reding
2014-07-11 20:33             ` Sam Ravnborg
2013-12-12 14:53 ` Daniel Vetter
2013-12-12 14:53   ` Daniel Vetter
2013-12-12 15:08   ` Thierry Reding
2013-12-12 15:08     ` Thierry Reding
2013-12-12 19:34 ` Thomas Hellstrom
2013-12-12 19:34   ` Thomas Hellstrom
2013-12-12 22:30   ` Daniel Vetter
2013-12-12 22:30     ` Daniel Vetter
2013-12-14 12:37     ` Thierry Reding
2013-12-14 12:37       ` Thierry Reding
2013-12-14 12:47       ` Thomas Hellstrom [this message]
2013-12-14 12:47         ` Thomas Hellstrom
2013-12-14 13:02         ` Rob Clark
2013-12-14 13:10           ` Thomas Hellstrom
2013-12-14 13:10             ` Thomas Hellstrom
2013-12-14 16:05       ` Daniel Vetter
2013-12-14 16:05         ` Daniel Vetter
2013-12-14 12:39   ` Thierry Reding
2013-12-14 12:39     ` Thierry Reding
2013-12-13  2:04 ` Greg Kroah-Hartman
2013-12-14 12:16   ` Thierry Reding
2013-12-14 12:16     ` Thierry Reding
2013-12-14 17:42     ` Daniel Vetter
2013-12-14 17:42       ` Daniel Vetter
2013-12-14 19:26     ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52AC536D.70901@shipmail.org \
    --to=thomas@shipmail.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thellstrom@vmware.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.