Commit 8966652b authored by Ben Skeggs's avatar Ben Skeggs Committed by Greg Kroah-Hartman

drm/nouveau/kms/gv100-: fix spurious window immediate interlocks

[ Upstream commit d2434e4d ]

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: default avatarLyude Paul <lyude@redhat.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fa57e115
...@@ -41,6 +41,7 @@ struct nv50_disp_interlock { ...@@ -41,6 +41,7 @@ struct nv50_disp_interlock {
NV50_DISP_INTERLOCK__SIZE NV50_DISP_INTERLOCK__SIZE
} type; } type;
u32 data; u32 data;
u32 wimm;
}; };
void corec37d_ntfy_init(struct nouveau_bo *, u32); void corec37d_ntfy_init(struct nouveau_bo *, u32);
......
...@@ -75,6 +75,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm, ...@@ -75,6 +75,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm,
return ret; return ret;
} }
wndw->interlock.wimm = wndw->interlock.data;
wndw->immd = func; wndw->immd = func;
return 0; return 0;
} }
......
...@@ -149,7 +149,7 @@ nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock, ...@@ -149,7 +149,7 @@ nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock,
if (asyw->set.point) { if (asyw->set.point) {
if (asyw->set.point = false, asyw->set.mask) if (asyw->set.point = false, asyw->set.mask)
interlock[wndw->interlock.type] |= wndw->interlock.data; 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->point(wndw, asyw);
wndw->immd->update(wndw, interlock); wndw->immd->update(wndw, interlock);
......
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