Re: [PATCH 1/5] drm/radeon: add userptr support v5

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

 



Am 28.07.2014 um 17:27 schrieb Daniel Vetter:
On Mon, Jul 28, 2014 at 01:30:08PM +0200, Christian König wrote:
+struct dma_buf *radeon_gem_prime_export(struct drm_device *dev,
+					struct drm_gem_object *gobj,
+					int flags)
+{
+	struct radeon_bo *bo = gem_to_radeon_bo(gobj);
+	if (radeon_ttm_tt_has_userptr(bo->tbo.ttm))
+		return ERR_PTR(-EPERM);
dma-buf is used by wayland and dri3, so this won't cut it. Instead you
need to reject any real device attachments with a special ->attach
callback to make sure that dma-bufs are still useful as buffer cookies,
but not for actual cross-device sharing.

It's not only cross device sharing we need to deny, but indeed cross process sharing of the buffer.

Apart from that those buffers should never leave the driver in any way.

Christian.

-Daniel

_______________________________________________
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