From 9f7ffb49ee6b80a339191a8c282fdf1c89fc01f7 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Sat, 20 Jun 2020 15:53:59 +1000 Subject: [PATCH] drm/nouveau/kms/nv50-: use NVIDIA's headers for wndw update() Signed-off-by: Ben Skeggs Reviewed-by: Lyude Paul --- drivers/gpu/drm/nouveau/dispnv50/base507c.c | 2 +- drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 14 ++++++++------ 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); }