drm/nouveau/core/mm: modify test for if building a mm with holes in it
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
This commit is contained in:
Родитель
79456e1a10
Коммит
d979ab975e
|
@ -211,7 +211,9 @@ nouveau_mm_init(struct nouveau_mm *mm, u32 offset, u32 length, u32 block)
|
|||
{
|
||||
struct nouveau_mm_node *node;
|
||||
|
||||
if (block) {
|
||||
if (nouveau_mm_initialised(mm)) {
|
||||
BUG_ON(block != mm->block_size);
|
||||
} else {
|
||||
INIT_LIST_HEAD(&mm->nodes);
|
||||
INIT_LIST_HEAD(&mm->free);
|
||||
mm->block_size = block;
|
||||
|
|
|
@ -562,7 +562,7 @@ nvc0_ram_create_(struct nouveau_object *parent, struct nouveau_object *engine,
|
|||
offset = (0x0200000000ULL >> 12) + (bsize << 8);
|
||||
length = (ram->size >> 12) - ((bsize * parts) << 8) - rsvd_tail;
|
||||
|
||||
ret = nouveau_mm_init(&pfb->vram, offset, length, 0);
|
||||
ret = nouveau_mm_init(&pfb->vram, offset, length, 1);
|
||||
if (ret)
|
||||
nouveau_mm_fini(&pfb->vram);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче