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

Daniel Vetter daniel at ffwll.ch
Mon Jul 28 08:27:41 PDT 2014


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.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch


More information about the dri-devel mailing list