On Thu, Mar 21, 2019 at 01:12:07PM -0400, Jerome Glisse wrote:
> On Thu, Mar 21, 2019 at 04:59:14PM +0100, Tobias Klausmann wrote:
> > Hi,
> > 
> > just for your information and maybe for some help: with 5.1rc1 and SVM
> > enabled i see the following backtrace [1] when the nouveau card (reverse
> > prime) goes to sleep, for now i have papered over with [2] which leaves me
> > with userspace hangs. Any pointers where to look for the actual culprit?
> > 
> > PS: Card is: nouveau 0000:01:00.0: NVIDIA GP106 (136000a1)
> > 
> > Greetings,
> > 
> > Tobias
> 
> Can you check if attached patch fix the issue ?

Sorry sent bogus patch here is a good one ...

Cheers,
Jérôme


>From 5b413953ba7abd3f92f46ef8261cd64368f0ae84 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= <[email protected]>
Date: Thu, 21 Mar 2019 13:08:46 -0400
Subject: [PATCH] gpu/nouveau: empty chunk do not have a buffer object
 associated with them.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Empty chunk do not have a bo associated with them so no need to pin/unpin
on suspend/resume.

Signed-off-by: Jérôme Glisse <[email protected]>
Cc: Ben Skeggs <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: David Airlie <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: [email protected]
---
 drivers/gpu/drm/nouveau/nouveau_dmem.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_dmem.c 
b/drivers/gpu/drm/nouveau/nouveau_dmem.c
index aa9fec80492d..a510dbe9a9cb 100644
--- a/drivers/gpu/drm/nouveau/nouveau_dmem.c
+++ b/drivers/gpu/drm/nouveau/nouveau_dmem.c
@@ -456,11 +456,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);
 }
 
@@ -479,9 +474,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);
 }
 
-- 
2.17.1

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

Reply via email to