From: Daniel Vetter <daniel@ffwll.ch>
To: Ezequiel Garcia <ezequiel@collabora.com>
Cc: dri-devel@lists.freedesktop.org, kernel@collabora.com
Subject: Re: [PATCH v2] drm: Allow CAP_DUMB_BUFFERS on !MODESET
Date: Wed, 9 May 2018 10:11:06 +0200 [thread overview]
Message-ID: <20180509081106.GR28661@phenom.ffwll.local> (raw)
In-Reply-To: <2dd4f5693d62c5bfb9bd4a414c88956729556130.camel@collabora.com>
On Tue, May 08, 2018 at 08:42:03PM -0300, Ezequiel Garcia wrote:
> Hey Daniel,
>
> On Tue, 2018-05-08 at 09:55 +0200, Daniel Vetter wrote:
> > On Tue, May 08, 2018 at 01:52:01AM -0300, Ezequiel Garcia wrote:
> > > It's perfectly possible to get dumb buffers out of drivers
> > > that don't support modeset. This is the case of vgem,
> > > which can be used to export dmabuf to run various tests.
> > >
> > > Inspired by commit f3f4c4d68a28 ("drm: Allow CAP_PRIME on !MODESET").
> >
> > Prime makes sense, because render-only drivers _really_ want to be able to
> > share buffers.
> >
> > But dumb buffers are really meant for dumb userspace running on kms
> > drivers only, there's no need ever to tell userspace that dumb buffers are
> > supported on non-kms drivers. It's kinda abuse of ioctls, but oh well,
> > uapi is fixed forever. And you can still call the ioctls if you know
> > they're there (which is always the case for the render-side of drm,
> > there's no generic alloc ioctl for those).
> >
>
> Right, I see.
>
> Well, I was mostly interested in dry testing, and vgem seemed a good
> candidate for a dma-buf exporter. For instance, this would be useful
> to test dmabuf video4linux pipelines.
You can still use the ioctl ... we have tons of tests using vgem for
buffer import/export in our igt gpu tests. Testing prime is exactly what
vgem is for!
What you don't need is confuse generic userspace by enabling the getparam
for dumb buffers. But such vgem-specific tests aren't generic userspace.
https://cgit.freedesktop.org/drm/igt-gpu-tools/
https://cgit.freedesktop.org/drm/igt-gpu-tools/tree/tests/prime_vgem.c
Cheers, Daniel
> Now, is this is a nack, then the other path is to support proper prime
> operations on virtio-gpu (which I'm also working on).
>
> Thanks for reviewing!
> Eze
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2018-05-09 8:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-04 14:25 [PATCH] drm: Allow CAP_DUMB_BUFFERS on !MODESET Ezequiel Garcia
2018-05-07 9:36 ` Maarten Lankhorst
2018-05-08 4:47 ` Ezequiel Garcia
2018-05-08 4:52 ` [PATCH v2] " Ezequiel Garcia
2018-05-08 7:55 ` Daniel Vetter
2018-05-08 23:42 ` Ezequiel Garcia
2018-05-09 8:11 ` Daniel Vetter [this message]
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=20180509081106.GR28661@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=ezequiel@collabora.com \
--cc=kernel@collabora.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox