drm/nouveau/kms/nv50-: use NVIDIA's headers for wimm update()

Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Reviewed-by: Lyude Paul <lyude@redhat.com>
This commit is contained in:
Ben Skeggs 2020-06-21 10:36:33 +10:00
parent 937014086a
commit 852dfbde91
3 changed files with 10 additions and 6 deletions

View File

@ -46,9 +46,12 @@ curs507a_space(struct nv50_wndw *wndw)
static int
curs507a_update(struct nv50_wndw *wndw, u32 *interlock)
{
struct nvif_object *user = &wndw->wimm.base.user;
int ret = nvif_chan_wait(&wndw->wimm, 1);
if (ret == 0)
nvif_wr32(&wndw->wimm.base.user, 0x0080, 0x00000000);
if (ret == 0) {
NVIF_WR32(user, NV507A, UPDATE,
NVDEF(NV507A, UPDATE, INTERLOCK_WITH_CORE, DISABLE));
}
return ret;
}

View File

@ -27,9 +27,10 @@
static int
cursc37a_update(struct nv50_wndw *wndw, u32 *interlock)
{
struct nvif_object *user = &wndw->wimm.base.user;
int ret = nvif_chan_wait(&wndw->wimm, 1);
if (ret == 0)
nvif_wr32(&wndw->wimm.base.user, 0x0200, 0x00000001);
NVIF_WR32(user, NVC37A, UPDATE, 0x00000001);
return ret;
}

View File

@ -37,9 +37,9 @@ wimmc37b_update(struct nv50_wndw *wndw, u32 *interlock)
if ((ret = PUSH_WAIT(push, 2)))
return ret;
PUSH_NVSQ(push, NVC37B, 0x0200, ((interlock[NV50_DISP_INTERLOCK_WNDW] &
wndw->interlock.data) ? 0x00000002 : 0x00000000) |
0x00000001);
PUSH_MTHD(push, NVC37B, UPDATE, 0x00000001 |
NVVAL(NVC37B, UPDATE, INTERLOCK_WITH_WINDOW,
!!(interlock[NV50_DISP_INTERLOCK_WNDW] & wndw->interlock.data)));
return PUSH_KICK(push);
}