diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-12-11 13:21:24 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-12-22 08:37:38 +1000 |
commit | 5f3ac299c0b76addcf3706cb6cc9d04dad26dab0 (patch) | |
tree | b18d66daacd6e11e5bb8f616493b0f327b57cdd1 | |
parent | 0b428011fa2b2f41d3f82ddf2c141fdf936dbaee (diff) | |
download | op-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>
-rw-r--r-- | drivers/gpu/drm/nouveau/core/subdev/fb/ramnvaa.c | 7 |
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; |