diff options
author | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-01-09 05:03:15 -0500 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@canonical.com> | 2014-10-01 05:11:15 -0400 |
commit | bb6178b04f5ef6f62990306713fb6afdf5d8bc56 (patch) | |
tree | 22e515525032c8157cc46e4c0481b25ff80e352e /drivers/gpu/drm/nouveau/nouveau_prime.c | |
parent | f4f4e3e3e9f3bde110067b9e4487cb267d90055a (diff) |
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, | |||
61 | struct sg_table *sg) | 61 | struct sg_table *sg) |
62 | { | 62 | { |
63 | struct nouveau_bo *nvbo; | 63 | struct nouveau_bo *nvbo; |
64 | struct reservation_object *robj = attach->dmabuf->resv; | ||
64 | u32 flags = 0; | 65 | u32 flags = 0; |
65 | int ret; | 66 | int ret; |
66 | 67 | ||
67 | flags = TTM_PL_FLAG_TT; | 68 | flags = TTM_PL_FLAG_TT; |
68 | 69 | ||
70 | ww_mutex_lock(&robj->lock, NULL); | ||
69 | ret = nouveau_bo_new(dev, attach->dmabuf->size, 0, flags, 0, 0, | 71 | ret = nouveau_bo_new(dev, attach->dmabuf->size, 0, flags, 0, 0, |
70 | sg, &nvbo); | 72 | sg, robj, &nvbo); |
73 | ww_mutex_unlock(&robj->lock); | ||
71 | if (ret) | 74 | if (ret) |
72 | return ERR_PTR(ret); | 75 | return ERR_PTR(ret); |
73 | 76 | ||