All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Adam Jackson <ajax@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC PATCH] drm/vgem: virtual GEM provider
Date: Wed, 11 Jan 2012 21:32:04 +0100	[thread overview]
Message-ID: <20120111203204.GC3855@phenom.ffwll.local> (raw)
In-Reply-To: <1326309561-21055-1-git-send-email-ajax@redhat.com>

On Wed, Jan 11, 2012 at 02:19:21PM -0500, Adam Jackson wrote:
> This is about as minimal of a virtual GEM service as possible.  My plan
> is to use this with non-native-3D hardware for buffer sharing between X
> and DRI.
> 
> The current drisw winsys assumes an unmodified X server, which means
> it's hopelessly inefficient for both the push direction of SwapBuffers/
> DrawPixels and the pull direction of GLX_EXT_texture_from_pixmap.  I'm
> still working through the details of what the xserver support will look
> like, but in broad strokes it's "use vgem for CreatePixmap and
> optionally the shadowfb".
> 
> Obviously alpha quality, mostly looking for feedback on the approach or
> any glaring bugs.  Eventually I'd like to see solutions for sharing gem
> objects between drm devices and/or the dma_buf API, but that's a ways
> down the road.
> 
> Signed-off-by: Adam Jackson <ajax@redhat.com>

I like this and the userspace abi is pretty much what I expect for such a
beast. I think integration with other drivers/dma_buf can just happen with
prime, nothing special needed. A few quick comments on the code
- no need to allocate a gem mmap offset if you only expose the direct shm
  mmap. This also will make the BUG in _fault correct, otherwise userspace
  could try to mmap well-guessed ranges on the fd and hit this.
- unsigned int in ioctl structs instead if __u32 (and also use __u64).
- I don't see why you have a size arg for the mmap ioctl, simply mapping
  the entire bo is likely all you ever want.
- The fops is inline instead of separate and constified.

Otherwise I couldn't find anything to complain about ;-)

Cheers, Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

  parent reply	other threads:[~2012-01-11 20:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 19:19 [RFC PATCH] drm/vgem: virtual GEM provider Adam Jackson
2012-01-11 20:16 ` Eric Anholt
2012-01-11 21:04   ` Adam Jackson
2012-02-07 23:28     ` Ben Widawsky
2012-02-07 23:32       ` Adam Jackson
2012-01-11 20:32 ` Daniel Vetter [this message]
2012-01-11 20:54   ` Dave Airlie

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=20120111203204.GC3855@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=ajax@redhat.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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.