aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2009-12-16 13:03:28 -0500
committerDave Airlie <airlied@redhat.com>2010-01-10 23:41:06 -0500
commitaeca15e596eba284c727049d0b9b855b13c48856 (patch)
tree43d93189b8bb98c9a4ededab2f411b85ec8f9e75 /drivers/gpu
parent69a18c328b762eaec3f8ca3af8c7cbf10b536bf8 (diff)
drm/nouveau: Drop redundant placement initialization.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_bo.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c
index 73af53fe75a0..5fd462f49407 100644
--- a/drivers/gpu/drm/nouveau/nouveau_bo.c
+++ b/drivers/gpu/drm/nouveau/nouveau_bo.c
@@ -130,7 +130,7 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan,
130{ 130{
131 struct drm_nouveau_private *dev_priv = dev->dev_private; 131 struct drm_nouveau_private *dev_priv = dev->dev_private;
132 struct nouveau_bo *nvbo; 132 struct nouveau_bo *nvbo;
133 int ret, n = 0; 133 int ret = 0;
134 134
135 nvbo = kzalloc(sizeof(struct nouveau_bo), GFP_KERNEL); 135 nvbo = kzalloc(sizeof(struct nouveau_bo), GFP_KERNEL);
136 if (!nvbo) 136 if (!nvbo)
@@ -145,19 +145,11 @@ nouveau_bo_new(struct drm_device *dev, struct nouveau_channel *chan,
145 nouveau_bo_fixup_align(dev, tile_mode, tile_flags, &align, &size); 145 nouveau_bo_fixup_align(dev, tile_mode, tile_flags, &align, &size);
146 align >>= PAGE_SHIFT; 146 align >>= PAGE_SHIFT;
147 147
148 if (flags & TTM_PL_FLAG_VRAM)
149 nvbo->placements[n++] = TTM_PL_FLAG_VRAM | TTM_PL_MASK_CACHING;
150 if (flags & TTM_PL_FLAG_TT)
151 nvbo->placements[n++] = TTM_PL_FLAG_TT | TTM_PL_MASK_CACHING;
152 nvbo->placement.fpfn = 0; 148 nvbo->placement.fpfn = 0;
153 nvbo->placement.lpfn = mappable ? dev_priv->fb_mappable_pages : 0; 149 nvbo->placement.lpfn = mappable ? dev_priv->fb_mappable_pages : 0;
154 nvbo->placement.placement = nvbo->placements; 150 nouveau_bo_placement_set(nvbo, flags);
155 nvbo->placement.busy_placement = nvbo->placements;
156 nvbo->placement.num_placement = n;
157 nvbo->placement.num_busy_placement = n;
158 151
159 nvbo->channel = chan; 152 nvbo->channel = chan;
160 nouveau_bo_placement_set(nvbo, flags);
161 ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size, 153 ret = ttm_bo_init(&dev_priv->ttm.bdev, &nvbo->bo, size,
162 ttm_bo_type_device, &nvbo->placement, align, 0, 154 ttm_bo_type_device, &nvbo->placement, align, 0,
163 false, NULL, size, nouveau_bo_del_ttm); 155 false, NULL, size, nouveau_bo_del_ttm);