[Linaro-mm-sig] [PATCH 6/7] drm/vgem: import support
Chris Wilson
chris at chris-wilson.co.uk
Thu Feb 23 15:00:56 PST 2012
On Wed, 22 Feb 2012 20:29:19 +0100, Ben Widawsky <ben at 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
More information about the dri-devel
mailing list