summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/nouveau_ttm.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-08-09 22:10:28 +0400
committerBen Skeggs <bskeggs@redhat.com>2014-08-09 23:28:12 +0400
commitf392ec4b1d92004949e5a4f4418b1fbb2582ef0d (patch)
tree874ee094191f6c8e4d59e11fa744c0d4f2a61e55 /drivers/gpu/drm/nouveau/nouveau_ttm.c
parent80bc340b3dd720c5b7818e21a9a1ee36e1d7ef30 (diff)
downloadlinux-f392ec4b1d92004949e5a4f4418b1fbb2582ef0d.tar.xz
drm/nouveau: use ram info from nvif_device
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_ttm.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_ttm.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c
index 244c58ee45a6..53874b76b031 100644
--- a/drivers/gpu/drm/nouveau/nouveau_ttm.c
+++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c
@@ -389,8 +389,7 @@ nouveau_ttm_init(struct nouveau_drm *drm)
}
/* VRAM init */
- drm->gem.vram_available = nvkm_fb(&drm->device)->ram->size;
- drm->gem.vram_available -= nvkm_instmem(&drm->device)->reserved;
+ drm->gem.vram_available = drm->device.info.ram_user;
ret = ttm_bo_init_mm(&drm->ttm.bdev, TTM_PL_VRAM,
drm->gem.vram_available >> PAGE_SHIFT);