diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-20 01:47:20 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:53 +0300 |
commit | 222439ebe6d4ec94b013968b07334a55612f641b (patch) | |
tree | c313edce65f68a7719a875c687fb4b5690987c7f /drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | |
parent | cfb4120dae34538e0ac14c9f972d4b3b80159224 (diff) | |
download | linux-222439ebe6d4ec94b013968b07334a55612f641b.tar.xz |
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/wndwc37e.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c index 8ed979836d63..38778cfaeca2 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc37e.c @@ -59,19 +59,21 @@ wndwc37e_ilut_clr(struct nv50_wndw *wndw) } } -static void +static int wndwc37e_ilut_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { - u32 *push; - if ((push = evo_wait(&wndw->wndw, 4))) { - evo_mthd(push, 0x02b0, 3); - evo_data(push, asyw->xlut.i.output_mode << 8 | - asyw->xlut.i.range << 4 | - asyw->xlut.i.size); - evo_data(push, asyw->xlut.i.offset >> 8); - evo_data(push, asyw->xlut.handle); - 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, NVC37E, 0x02b0, asyw->xlut.i.output_mode << 8 | + asyw->xlut.i.range << 4 | + asyw->xlut.i.size, + 0x02b4, asyw->xlut.i.offset >> 8, + 0x02b8, asyw->xlut.handle); + return 0; } static bool |