diff options
author | Dave Airlie <airlied@redhat.com> | 2014-08-26 01:05:14 +0200 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2014-08-26 01:05:14 +0200 |
commit | 484048db6b4890bc433aac7f5e32fdcf1b2b4786 (patch) | |
tree | c6be2f9cbe71d6732975c987e1c814c0298b0b65 /drivers/gpu/drm/radeon/radeon_prime.c | |
parent | Merge tag 'drm-intel-next-2014-08-08' of git://anongit.freedesktop.org/drm-in... (diff) | |
parent | drm/radeon: allow userptr write access under certain conditions (diff) | |
download | linux-484048db6b4890bc433aac7f5e32fdcf1b2b4786.tar.xz linux-484048db6b4890bc433aac7f5e32fdcf1b2b4786.zip |
Merge branch 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux into drm-next
radeon userptr support.
* 'drm-next-3.18' of git://people.freedesktop.org/~agd5f/linux:
drm/radeon: allow userptr write access under certain conditions
drm/radeon: add userptr flag to register MMU notifier v3
drm/radeon: add userptr flag to directly validate the BO to GTT
drm/radeon: add userptr flag to limit it to anonymous memory v2
drm/radeon: add userptr support v8
Conflicts:
drivers/gpu/drm/radeon/radeon_prime.c
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_prime.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_prime.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c index 0b16f2cbcf17..d5414d42e44b 100644 --- a/drivers/gpu/drm/radeon/radeon_prime.c +++ b/drivers/gpu/drm/radeon/radeon_prime.c @@ -111,3 +111,13 @@ struct reservation_object *radeon_gem_prime_res_obj(struct drm_gem_object *obj) return bo->tbo.resv; } + +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); + return drm_gem_prime_export(dev, gobj, flags); +} |