All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: Emil Velikov <emil.l.velikov@gmail.com>
Cc: oleksandr_andrushchenko@epam.com,
	"ML dri-devel" <dri-devel@lists.freedesktop.org>,
	"Dave Airlie" <airlied@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>
Subject: Re: [PATCH] Revert "drm/virtio: drop prime import/export callbacks"
Date: Tue, 23 Apr 2019 16:06:46 +0200	[thread overview]
Message-ID: <20190423140646.2ujxqsjwfuzf4fxp@sirius.home.kraxel.org> (raw)
In-Reply-To: <CACvgo50Z-W7gQuEDqU95nVuV2J0tZ9Yoy9OkZdjDp7bcDKz9Yg@mail.gmail.com>

On Tue, Apr 23, 2019 at 12:55:07PM +0100, Emil Velikov wrote:
> On Tue, 23 Apr 2019 at 09:05, Gerd Hoffmann <kraxel@redhat.com> wrote:
> >
> >   Hi,
> >
> > > > The DRI3 code extensively uses prime_handle_to_fd and
> > > > prime_fd_to_handle for self-import.
> >
> > The callbacks are not used for self-import.
> >
> Userspace converts from it's own handles to a dmabuf fd and vice-versa.
> I assumed that's called self-import, is it not?

self-import is importing a dma-buf into the driver which created it.

drm_gem_prime.c has a shortcut for that, it'll just increase the gem
reference count instead of going though a full-blown export/import.

The prime_handle_to_fd and prime_fd_to_handle callbacks are only needed
for the non-self-import case, where the other driver needs/provides a
scatter list.

cheers,
  Gerd

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-04-23 14:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-19 15:57 [PATCH] Revert "drm/virtio: drop prime import/export callbacks" Marc-André Lureau
2019-04-19 16:21 ` Emil Velikov
2019-04-19 16:45   ` Chia-I Wu
2019-04-23  8:05     ` Gerd Hoffmann
2019-04-23 11:55       ` Emil Velikov
2019-04-23 14:06         ` Gerd Hoffmann [this message]
2019-04-23 16:17           ` Emil Velikov
2019-04-24  0:54             ` Dave Airlie
2019-04-23  8:01 ` Gerd Hoffmann

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=20190423140646.2ujxqsjwfuzf4fxp@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=airlied@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=emil.l.velikov@gmail.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=oleksandr_andrushchenko@epam.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.