drm/nouveau/dmem: empty chunk do not have a buffer object associated with them.
authorJérôme Glisse <jglisse@redhat.com>
Thu, 21 Mar 2019 19:42:18 +0000 (15:42 -0400)
committerBen Skeggs <bskeggs@redhat.com>
Thu, 21 Mar 2019 23:58:38 +0000 (09:58 +1000)
Empty chunk do not have a bo associated with them so no need to pin/unpin
on suspend/resume.

This fix suspend/resume on 5.1rc1 when NOUVEAU_SVM is enabled.

Signed-off-by: Jérôme Glisse <jglisse@redhat.com>
Reviewed-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Tested-by: Tobias Klausmann <tobias.johannes.klausmann@mni.thm.de>
Cc: Ben Skeggs <bskeggs@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: nouveau@lists.freedesktop.org
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/nouveau_dmem.c

index b1df42f..61fc27d 100644 (file)
@@ -454,11 +454,6 @@ nouveau_dmem_resume(struct nouveau_drm *drm)
                /* FIXME handle pin failure */
                WARN_ON(ret);
        }
-       list_for_each_entry (chunk, &drm->dmem->chunk_empty, list) {
-               ret = nouveau_bo_pin(chunk->bo, TTM_PL_FLAG_VRAM, false);
-               /* FIXME handle pin failure */
-               WARN_ON(ret);
-       }
        mutex_unlock(&drm->dmem->mutex);
 }
 
@@ -477,9 +472,6 @@ nouveau_dmem_suspend(struct nouveau_drm *drm)
        list_for_each_entry (chunk, &drm->dmem->chunk_full, list) {
                nouveau_bo_unpin(chunk->bo);
        }
-       list_for_each_entry (chunk, &drm->dmem->chunk_empty, list) {
-               nouveau_bo_unpin(chunk->bo);
-       }
        mutex_unlock(&drm->dmem->mutex);
 }