summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-20 08:53:59 +0300
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 11:51:00 +0300
commit9f7ffb49ee6b80a339191a8c282fdf1c89fc01f7 (patch)
tree77269307c35485faca5b1cf05ba5432d3b72d001
parentfbc318bdbb43a151b4f60ff3b86d577daeb63791 (diff)
downloadlinux-9f7ffb49ee6b80a339191a8c282fdf1c89fc01f7.tar.xz
drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw update()
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/base507c.c2
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c14
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/base507c.c b/drivers/gpu/drm/nouveau/dispnv50/base507c.c
index db811751800a..302d4e6fc52f 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/base507c.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/base507c.c
@@ -43,7 +43,7 @@ base507c_update(struct nv50_wndw *wndw, u32 *interlock)
if ((ret = PUSH_WAIT(push, 2)))
return ret;
- PUSH_NVSQ(push, NV507C, 0x0080, interlock[NV50_DISP_INTERLOCK_CORE]);
+ PUSH_MTHD(push, NV507C, UPDATE, interlock[NV50_DISP_INTERLOCK_CORE]);
return PUSH_KICK(push);
}
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
index 8dd1e89f4725..57df997c5ff3 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c
@@ -279,12 +279,14 @@ wndwc37e_update(struct nv50_wndw *wndw, u32 *interlock)
if ((ret = PUSH_WAIT(push, 5)))
return ret;
- PUSH_NVSQ(push, NVC37E, 0x0370, interlock[NV50_DISP_INTERLOCK_CURS] << 1 |
- interlock[NV50_DISP_INTERLOCK_CORE],
- 0x0374, interlock[NV50_DISP_INTERLOCK_WNDW]);
- PUSH_NVSQ(push, NVC37E, 0x0200,((interlock[NV50_DISP_INTERLOCK_WIMM] &
- wndw->interlock.data) ? 0x00001000 : 0x00000000) |
- 0x00000001);
+ PUSH_MTHD(push, NVC37E, SET_INTERLOCK_FLAGS, interlock[NV50_DISP_INTERLOCK_CURS] << 1 |
+ interlock[NV50_DISP_INTERLOCK_CORE],
+ SET_WINDOW_INTERLOCK_FLAGS, interlock[NV50_DISP_INTERLOCK_WNDW]);
+
+ PUSH_MTHD(push, NVC37E, UPDATE, 0x00000001 |
+ NVVAL(NVC37E, UPDATE, INTERLOCK_WITH_WIN_IMM,
+ !!(interlock[NV50_DISP_INTERLOCK_WIMM] & wndw->interlock.data)));
+
return PUSH_KICK(push);
}