Commit bbb10e63 authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau: fix handling of GART OOM on pre-NV50 chipsets

The correct thing to do on OOM is to return 0 and set mm_node to NULL,
otherwise TTM will assume some other kind of error, and not attempt to
evict other buffers to make space.
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 9551efcf
......@@ -243,6 +243,10 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
ret = nvkm_vm_get(man->priv, reg->num_pages << 12, node->page_shift,
NV_MEM_ACCESS_RW, &node->vma[0]);
if (ret) {
if (ret == -ENOSPC) {
reg->mm_node = NULL;
ret = 0;
}
kfree(node);
return 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