summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2020-06-20 08:47:20 +1000
committerBen Skeggs <bskeggs@redhat.com>2020-07-24 18:50:53 +1000
commit222439ebe6d4ec94b013968b07334a55612f641b (patch)
treec313edce65f68a7719a875c687fb4b5690987c7f /drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c
parentcfb4120dae34538e0ac14c9f972d4b3b80159224 (diff)
drm/nouveau/kms/nv50-: convert wndw xlut_set() to new push macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c')
-rw-r--r--drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c
index 1c33e18258d5..1dc5a188e6ff 100644
--- a/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c
+++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c
@@ -103,19 +103,21 @@ wndwc57e_ilut_clr(struct nv50_wndw *wndw)
}
}
-static void
+static int
wndwc57e_ilut_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{
- u32 *push;
- if ((push = evo_wait(&wndw->wndw, 4))) {
- evo_mthd(push, 0x0440, 3);
- evo_data(push, asyw->xlut.i.size << 8 |
- asyw->xlut.i.mode << 2 |
- asyw->xlut.i.output_mode);
- evo_data(push, asyw->xlut.handle);
- evo_data(push, asyw->xlut.i.offset >> 8);
- evo_kick(push, &wndw->wndw);
- }
+ struct nvif_push *push = wndw->wndw.push;
+ int ret;
+
+ if ((ret = PUSH_WAIT(push, 4)))
+ return ret;
+
+ PUSH_NVSQ(push, NVC57E, 0x0440, asyw->xlut.i.size << 8 |
+ asyw->xlut.i.mode << 2 |
+ asyw->xlut.i.output_mode,
+ 0x0444, asyw->xlut.handle,
+ 0x0448, asyw->xlut.i.offset >> 8);
+ return 0;
}
static u16