Commit 5f3ac299 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/fb/ram/mcp77: use carveout reg to determine size

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 0b428011
...@@ -44,16 +44,15 @@ nvaa_ram_ctor(struct nouveau_object *parent, struct nouveau_object *engine, ...@@ -44,16 +44,15 @@ nvaa_ram_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
if (ret) if (ret)
return ret; return ret;
priv->base.size = nv_rd32(pfb, 0x10020c); priv->base.type = NV_MEM_TYPE_STOLEN;
priv->base.size = (priv->base.size & 0xffffff00) | ((priv->base.size & 0x000000ff) << 32); 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) - ret = nouveau_mm_init(&pfb->vram, rsvd_head, (priv->base.size >> 12) -
(rsvd_head + rsvd_tail), 1); (rsvd_head + rsvd_tail), 1);
if (ret) if (ret)
return 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.get = nv50_ram_get;
priv->base.put = nv50_ram_put; priv->base.put = nv50_ram_put;
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment