aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_gem.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2011-02-15 17:41:56 -0500
committerBen Skeggs <bskeggs@redhat.com>2011-02-24 15:45:34 -0500
commitd550c41e4ff11fe69b5f92868157253d27937d1f (patch)
tree5c51d494f497d6cdffc822964bfeca0ba310ac3d /drivers/gpu/drm/nouveau/nouveau_gem.c
parent2503c6fa3edf7c2bb001c7f7926786eed24cc06e (diff)
drm/nouveau: remove no_vm/mappable flags from nouveau_bo
'mappable' isn't really used at all, nor is it necessary anymore as the bo code is capable of moving buffers to mappable vram as required. 'no_vm' isn't necessary anymore either, any places that don't want to be mapped into a GPU address space should allocate the VRAM directly instead. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_gem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_gem.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c b/drivers/gpu/drm/nouveau/nouveau_gem.c
index 506c508b7eda..29ededdee980 100644
--- a/drivers/gpu/drm/nouveau/nouveau_gem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_gem.c
@@ -62,14 +62,13 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
62int 62int
63nouveau_gem_new(struct drm_device *dev, struct nouveau_channel *chan, 63nouveau_gem_new(struct drm_device *dev, struct nouveau_channel *chan,
64 int size, int align, uint32_t flags, uint32_t tile_mode, 64 int size, int align, uint32_t flags, uint32_t tile_mode,
65 uint32_t tile_flags, bool no_vm, bool mappable, 65 uint32_t tile_flags, struct nouveau_bo **pnvbo)
66 struct nouveau_bo **pnvbo)
67{ 66{
68 struct nouveau_bo *nvbo; 67 struct nouveau_bo *nvbo;
69 int ret; 68 int ret;
70 69
71 ret = nouveau_bo_new(dev, chan, size, align, flags, tile_mode, 70 ret = nouveau_bo_new(dev, chan, size, align, flags, tile_mode,
72 tile_flags, no_vm, mappable, pnvbo); 71 tile_flags, pnvbo);
73 if (ret) 72 if (ret)
74 return ret; 73 return ret;
75 nvbo = *pnvbo; 74 nvbo = *pnvbo;
@@ -97,7 +96,7 @@ nouveau_gem_info(struct drm_gem_object *gem, struct drm_nouveau_gem_info *rep)
97 96
98 rep->size = nvbo->bo.mem.num_pages << PAGE_SHIFT; 97 rep->size = nvbo->bo.mem.num_pages << PAGE_SHIFT;
99 rep->offset = nvbo->bo.offset; 98 rep->offset = nvbo->bo.offset;
100 rep->map_handle = nvbo->mappable ? nvbo->bo.addr_space_offset : 0; 99 rep->map_handle = nvbo->bo.addr_space_offset;
101 rep->tile_mode = nvbo->tile_mode; 100 rep->tile_mode = nvbo->tile_mode;
102 rep->tile_flags = nvbo->tile_flags; 101 rep->tile_flags = nvbo->tile_flags;
103 return 0; 102 return 0;
@@ -136,9 +135,7 @@ nouveau_gem_ioctl_new(struct drm_device *dev, void *data,
136 } 135 }
137 136
138 ret = nouveau_gem_new(dev, chan, req->info.size, req->align, flags, 137 ret = nouveau_gem_new(dev, chan, req->info.size, req->align, flags,
139 req->info.tile_mode, req->info.tile_flags, false, 138 req->info.tile_mode, req->info.tile_flags, &nvbo);
140 (req->info.domain & NOUVEAU_GEM_DOMAIN_MAPPABLE),
141 &nvbo);
142 if (chan) 139 if (chan)
143 nouveau_channel_put(&chan); 140 nouveau_channel_put(&chan);
144 if (ret) 141 if (ret)