]>
Commit | Line | Data |
---|---|---|
37554d48 SL |
1 | From da14d6c81685a58a9000790847f8a154f5f81313 Mon Sep 17 00:00:00 2001 |
2 | From: Ben Skeggs <bskeggs@redhat.com> | |
3 | Date: Fri, 3 May 2019 12:23:55 +1000 | |
4 | Subject: drm/nouveau/kms/gv100-: fix spurious window immediate interlocks | |
5 | ||
6 | [ Upstream commit d2434e4d942c32cadcbdbcd32c58f35098f3b604 ] | |
7 | ||
8 | Cursor position updates were accidentally causing us to attempt to interlock | |
9 | window with window immediate, and without a matching window immediate update, | |
10 | NVDisplay could hang forever in some circumstances. | |
11 | ||
12 | Fixes suspend/resume on (at least) Quadro RTX4000 (TU104). | |
13 | ||
14 | Reported-by: Lyude Paul <lyude@redhat.com> | |
15 | Signed-off-by: Ben Skeggs <bskeggs@redhat.com> | |
16 | Signed-off-by: Sasha Levin <sashal@kernel.org> | |
17 | --- | |
18 | drivers/gpu/drm/nouveau/dispnv50/disp.h | 1 + | |
19 | drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | 1 + | |
20 | drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 +- | |
21 | 3 files changed, 3 insertions(+), 1 deletion(-) | |
22 | ||
23 | diff --git a/drivers/gpu/drm/nouveau/dispnv50/disp.h b/drivers/gpu/drm/nouveau/dispnv50/disp.h | |
24 | index e48c5eb35b49..66c125a6b0b3 100644 | |
25 | --- a/drivers/gpu/drm/nouveau/dispnv50/disp.h | |
26 | +++ b/drivers/gpu/drm/nouveau/dispnv50/disp.h | |
27 | @@ -41,6 +41,7 @@ struct nv50_disp_interlock { | |
28 | NV50_DISP_INTERLOCK__SIZE | |
29 | } type; | |
30 | u32 data; | |
31 | + u32 wimm; | |
32 | }; | |
33 | ||
34 | void corec37d_ntfy_init(struct nouveau_bo *, u32); | |
35 | diff --git a/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c b/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | |
36 | index 9103b8494279..f7dbd965e4e7 100644 | |
37 | --- a/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | |
38 | +++ b/drivers/gpu/drm/nouveau/dispnv50/wimmc37b.c | |
39 | @@ -75,6 +75,7 @@ wimmc37b_init_(const struct nv50_wimm_func *func, struct nouveau_drm *drm, | |
40 | return ret; | |
41 | } | |
42 | ||
43 | + wndw->interlock.wimm = wndw->interlock.data; | |
44 | wndw->immd = func; | |
45 | return 0; | |
46 | } | |
47 | diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/drivers/gpu/drm/nouveau/dispnv50/wndw.c | |
48 | index 2187922e8dc2..b3db4553098d 100644 | |
49 | --- a/drivers/gpu/drm/nouveau/dispnv50/wndw.c | |
50 | +++ b/drivers/gpu/drm/nouveau/dispnv50/wndw.c | |
51 | @@ -151,7 +151,7 @@ nv50_wndw_flush_set(struct nv50_wndw *wndw, u32 *interlock, | |
52 | if (asyw->set.point) { | |
53 | if (asyw->set.point = false, asyw->set.mask) | |
54 | interlock[wndw->interlock.type] |= wndw->interlock.data; | |
55 | - interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.data; | |
56 | + interlock[NV50_DISP_INTERLOCK_WIMM] |= wndw->interlock.wimm; | |
57 | ||
58 | wndw->immd->point(wndw, asyw); | |
59 | wndw->immd->update(wndw, interlock); | |
60 | -- | |
61 | 2.20.1 | |
62 |