Re: [Linaro-mm-sig] [PATCH 6/7] drm/vgem: import support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 22 Feb 2012 20:29:19 +0100, Ben Widawsky <ben@xxxxxxxxxxxx> 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
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux