[PATCH 1/5] drm/radeon: add userptr support v5
Christian König
deathsimple at vodafone.de
Tue Jul 29 01:11:36 PDT 2014
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
More information about the dri-devel
mailing list