Commit 3d9e3921 authored by Ben Skeggs's avatar Ben Skeggs

drm/nvc0-/fb/ram: fix use of non-existant ram if partitions aren't uniform

Likely a large part of the GK106 woes..
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent e7d96929
......@@ -554,13 +554,13 @@ nvc0_ram_create_(struct nouveau_object *parent, struct nouveau_object *engine,
} else {
/* otherwise, address lowest common amount from 0GiB */
ret = nouveau_mm_init(&pfb->vram, rsvd_head,
(bsize << 8) * parts, 1);
(bsize << 8) * parts - rsvd_head, 1);
if (ret)
return ret;
/* and the rest starting from (8GiB + common_size) */
offset = (0x0200000000ULL >> 12) + (bsize << 8);
length = (ram->size >> 12) - (bsize << 8) - rsvd_tail;
length = (ram->size >> 12) - ((bsize * parts) << 8) - rsvd_tail;
ret = nouveau_mm_init(&pfb->vram, offset, length, 0);
if (ret)
......
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