]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/nouveau/kms/gv100-: fix spurious window immediate interlocks
authorBen Skeggs <bskeggs@redhat.com>
Fri, 3 May 2019 02:23:55 +0000 (12:23 +1000)
committerBen Skeggs <bskeggs@redhat.com>
Tue, 14 May 2019 06:58:05 +0000 (16:58 +1000)
Cursor position updates were accidentally causing us to attempt to interlock
window with window immediate, and without a matching window immediate update,
NVDisplay could hang forever in some circumstances.

Fixes suspend/resume on (at least) Quadro RTX4000 (TU104).

Reported-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/dispnv50/disp.h
drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c
drivers/gpu/drm/nouveau/dispnv50/wndw.c

index 2216c58620c2de8253b57c17446a24909eca9d3e..7c41b0599d1ac10791b71245e4a2b67a957d1169 100644 (file)
@@ -41,6 +41,7 @@ struct nv50_disp_interlock {
                NV50_DISP_INTERLOCK__SIZE
        } type;
        u32 data;
+       u32 wimm;
 };
 
 void corec37d_ntfy_init(struct nouveau_bo *, u32);
index 9103b8494279c6273c85867d6e183e73f507ed06..f7dbd965e4e729ccd98b4e7ed153bba6a327f893 100644 (file)
@@ -75,6 +75,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
                return ret;
        }
 
+       wndw->interlock.wimm = wndw->interlock.data;
        wndw->immd = func;
        return 0;
 }
index b95181027b3177610edf8f91c4ba97be6d7314be..471a39a077e55cb65c7c6df5873458ff94060573 100644 (file)
@@ -149,7 +149,7 @@ nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock,
        if (asyw->set.point) {
                if (asyw->set.point = false, asyw->set.mask)
                        interlock[wndw->interlock.type] |= wndw->interlock.data;
-               interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.data;
+               interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.wimm;
 
                wndw->immd->point(wndw, asyw);
                wndw->immd->update(wndw, interlock);