summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-12-11 13:21:24 +1000
committerBen Skeggs <bskeggs@redhat.com>2014-12-22 08:37:38 +1000
commit5f3ac299c0b76addcf3706cb6cc9d04dad26dab0 (patch)
treeb18d66daacd6e11e5bb8f616493b0f327b57cdd1 /drivers/gpu
parent0b428011fa2b2f41d3f82ddf2c141fdf936dbaee (diff)
downloadop-kernel-dev-5f3ac299c0b76addcf3706cb6cc9d04dad26dab0.zip
op-kernel-dev-5f3ac299c0b76addcf3706cb6cc9d04dad26dab0.tar.gz
drm/nouveau/fb/ram/mcp77: use carveout reg to determine size
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c b/drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c
index 8ee3d37..f56ee55 100644
--- a/drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c
+++ b/drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c
@@ -44,16 +44,15 @@ nvaa_ram_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if (ret)
return ret;
- priv->base.size = nv_rd32(pfb, 0x10020c);
- priv->base.size = (priv->base.size & 0xffffff00) | ((priv->base.size & 0x000000ff) << 32);
+ priv->base.type = NV_MEM_TYPE_STOLEN;
+ priv->base.stolen = (u64)nv_rd32(pfb, 0x100e10) << 12;
+ priv->base.size = (u64)nv_rd32(pfb, 0x100e14) << 12;
ret = nouveau_mm_init(&pfb->vram, rsvd_head, (priv->base.size >> 12) -
(rsvd_head + rsvd_tail), 1);
if (ret)
return ret;
- priv->base.type = NV_MEM_TYPE_STOLEN;
- priv->base.stolen = (u64)nv_rd32(pfb, 0x100e10) << 12;
priv->base.get = nv50_ram_get;
priv->base.put = nv50_ram_put;
return 0;
OpenPOWER on IntegriCloud