diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2014-12-11 06:21:24 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2014-12-22 01:37:38 +0300 |
commit | 5f3ac299c0b76addcf3706cb6cc9d04dad26dab0 (patch) | |
tree | b18d66daacd6e11e5bb8f616493b0f327b57cdd1 /drivers/gpu/drm/nouveau/core | |
parent | 0b428011fa2b2f41d3f82ddf2c141fdf936dbaee (diff) | |
download | linux-5f3ac299c0b76addcf3706cb6cc9d04dad26dab0.tar.xz |
drm/nouveau/fb/ram/mcp77: use carveout reg to determine size
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core')
-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 8ee3d377f6f3..f56ee5527006 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; |