diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-09-18 14:11:56 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2014-10-03 15:19:17 +0200 |
commit | 831b6966a60fe72d85ae3576056b4e4e0775b112 (patch) | |
tree | 7c7600d7c26b68e45726019e9c082e5f80e5f7e6 /drivers/gpu/drm/radeon/radeon_prime.c | |
parent | drm/radeon: cope with foreign fences inside the reservation object (diff) | |
download | linux-831b6966a60fe72d85ae3576056b4e4e0775b112.tar.xz linux-831b6966a60fe72d85ae3576056b4e4e0775b112.zip |
drm/radeon: export reservation_object from dmabuf to ttm
Adds an extra argument to radeon_bo_create, which is only used in radeon_prime.c.
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon/radeon_prime.c')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_prime.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_prime.c b/drivers/gpu/drm/radeon/radeon_prime.c index 171daf7fc483..f3609c97496b 100644 --- a/drivers/gpu/drm/radeon/radeon_prime.c +++ b/drivers/gpu/drm/radeon/radeon_prime.c @@ -61,12 +61,15 @@ struct drm_gem_object *radeon_gem_prime_import_sg_table(struct drm_device *dev, struct dma_buf_attachment *attach, struct sg_table *sg) { + struct reservation_object *resv = attach->dmabuf->resv; struct radeon_device *rdev = dev->dev_private; struct radeon_bo *bo; int ret; + ww_mutex_lock(&resv->lock, NULL); ret = radeon_bo_create(rdev, attach->dmabuf->size, PAGE_SIZE, false, - RADEON_GEM_DOMAIN_GTT, 0, sg, &bo); + RADEON_GEM_DOMAIN_GTT, 0, sg, resv, &bo); + ww_mutex_unlock(&resv->lock); if (ret) return ERR_PTR(ret); |