mirror of https://gitee.com/openkylin/linux.git
drm/nouveau/fb/ram/mcp77: use carveout reg to determine size
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
parent
0b428011fa
commit
5f3ac299c0
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue