From: Chris Wilson <chris@chris-wilson.co.uk>
To: Ben Widawsky <ben@bwidawsk.net>, dri-devel@lists.freedesktop.org
Cc: linaro-mm-sig@lists.linaro.org, Dave Airlie <airlied@redhat.com>
Subject: Re: [Linaro-mm-sig] [PATCH 6/7] drm/vgem: import support
Date: Thu, 23 Feb 2012 23:00:56 +0000 [thread overview]
Message-ID: <aefc95$3a671s@orsmga001.jf.intel.com> (raw)
In-Reply-To: <1329938960-4903-8-git-send-email-ben@bwidawsk.net>
On Wed, 22 Feb 2012 20:29:19 +0100, Ben Widawsky <ben@bwidawsk.net> wrote:
> + mutex_lock(&dev->prime_mutex);
> + /* First check that we don't dup on this file */
> + ret = drm_prime_lookup_fd_handle_mapping(&file_priv->prime, dma_buf,
> + handle);
The other example of importing bo we have already in GEM is through the
use of flink and global names. There we create a new handle every time a
process opens a name, and de-duplication is indeed handled in userspace
if it so desires.
Multiple handles pointing to the same object simplifies the code without
risking kernel integrity, so why bother with kernel de-dupe? And allow
userspace the extra bit of freedom to shoot itself in the foot!
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
next prev parent reply other threads:[~2012-02-23 23:01 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-02-22 19:29 [PATCH 0/7] RFCv3 VGEM Prime (dma-buf) Ben Widawsky
2012-02-22 19:29 ` [PATCH 1/7] drm: base prime support Ben Widawsky
2012-02-22 19:58 ` Kristian Høgsberg
2012-02-27 2:49 ` InKi Dae
2012-02-22 19:29 ` [PATCH 2/7] DRM_DEBUG_PRIME Ben Widawsky
2012-02-22 19:29 ` [PATCH 2/7] drm: DRM_DEBUG_PRIME Ben Widawsky
2012-02-22 19:29 ` [PATCH 3/7] drm/vgem: virtual GEM provider Ben Widawsky
2012-02-22 19:29 ` [PATCH 4/7] drm: per device prime dma buf hash Ben Widawsky
2012-02-22 19:29 ` [PATCH 5/7] drm/vgem: prime export support Ben Widawsky
2012-02-23 19:00 ` [Linaro-mm-sig] " Chris Wilson
2012-02-27 13:37 ` Tomasz Stanislawski
2012-02-27 15:43 ` Tomasz Stanislawski
2012-02-29 15:50 ` Daniel Vetter
2012-02-22 19:29 ` [PATCH 6/7] drm/vgem: import support Ben Widawsky
2012-02-23 19:10 ` [Linaro-mm-sig] " Chris Wilson
2012-02-23 23:00 ` Chris Wilson [this message]
2012-02-22 19:29 ` [PATCH 7/7] drm: actually enable PRIME Ben Widawsky
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='aefc95$3a671s@orsmga001.jf.intel.com' \
--to=chris@chris-wilson.co.uk \
--cc=airlied@redhat.com \
--cc=ben@bwidawsk.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=linaro-mm-sig@lists.linaro.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.