diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2017-11-01 03:56:19 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2017-11-02 13:32:16 +1000 |
commit | bbb10e639819e6a14e487ce14b3d8575767573b8 (patch) | |
tree | 87f33cf24ae1f77954698f98b7ae7eae383d8626 /drivers/gpu/drm/nouveau/nouveau_ttm.c | |
parent | 9551efcf7664b73d881de7eb88e4626c9561b624 (diff) | |
download | linux-bbb10e639819e6a14e487ce14b3d8575767573b8.tar.bz2 |
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: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nouveau_ttm.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_ttm.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c b/drivers/gpu/drm/nouveau/nouveau_ttm.c index b0ad7fcefcf5..ffc3458c89de 100644 --- a/drivers/gpu/drm/nouveau/nouveau_ttm.c +++ b/drivers/gpu/drm/nouveau/nouveau_ttm.c @@ -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; } |