diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-01-09 11:03:15 +0100 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-10-01 11:11:15 +0200 |
commit | bb6178b04f5ef6f62990306713fb6afdf5d8bc56 (patch) | |
tree | 22e515525032c8157cc46e4c0481b25ff80e352e /drivers/gpu/drm/nouveau/nouveau_prime.c | |
parent | drm/ttm: add reservation_object as argument to ttm_bo_init (diff) | |
download | linux-bb6178b04f5ef6f62990306713fb6afdf5d8bc56.tar.xz linux-bb6178b04f5ef6f62990306713fb6afdf5d8bc56.zip |
drm/nouveau: export reservation_object from dmabuf to ttm
Adds an extra argument to nouveau_bo_new, which is only used in nouveau_prime.c.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_prime.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_prime.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_prime.c b/drivers/gpu/drm/nouveau/nouveau_prime.c index 2215cdba587d..228226ab27fc 100644 --- a/drivers/gpu/drm/nouveau/nouveau_prime.c +++ b/drivers/gpu/drm/nouveau/nouveau_prime.c @@ -61,13 +61,16 @@ struct drm_gem_object *nouveau_gem_prime_import_sg_table(struct drm_device *dev, struct sg_table *sg) { struct nouveau_bo *nvbo; + struct reservation_object *robj = attach->dmabuf->resv; u32 flags = 0; int ret; flags = TTM_PL_FLAG_TT; + ww_mutex_lock(&robj->lock, NULL); ret = nouveau_bo_new(dev, attach->dmabuf->size, 0, flags, 0, 0, - sg, &nvbo); + sg, robj, &nvbo); + ww_mutex_unlock(&robj->lock); if (ret) return ERR_PTR(ret); |