diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-20 08:44:11 +1000 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 18:50:52 +1000 |
commit | cfb4120dae34538e0ac14c9f972d4b3b80159224 (patch) | |
tree | d433cb5ff2c5159b0aaa650381144a8f4175f755 /drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c | |
parent | 72587dca9658a0428518e658247c4490a0e0a09f (diff) |
drm/nouveau/kms/nv50-: convert wndw csc_clr() 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.c | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c index 9d155a7f14bf..1c33e18258d5 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c @@ -61,26 +61,22 @@ wndwc57e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) evo_kick(push, &wndw->wndw); } -static void +static int wndwc57e_csc_clr(struct nv50_wndw *wndw) { - u32 *push; - if ((push = evo_wait(&wndw->wndw, 13))) { - evo_mthd(push, 0x0400, 12); - evo_data(push, 0x00010000); - evo_data(push, 0x00000000); - evo_data(push, 0x00000000); - evo_data(push, 0x00000000); - evo_data(push, 0x00000000); - evo_data(push, 0x00010000); - evo_data(push, 0x00000000); - evo_data(push, 0x00000000); - evo_data(push, 0x00000000); - evo_data(push, 0x00000000); - evo_data(push, 0x00010000); - evo_data(push, 0x00000000); - evo_kick(push, &wndw->wndw); - } + struct nvif_push *push = wndw->wndw.push; + const u32 identity[12] = { + 0x00010000, 0x00000000, 0x00000000, 0x00000000, + 0x00000000, 0x00010000, 0x00000000, 0x00000000, + 0x00000000, 0x00000000, 0x00010000, 0x00000000, + }; + int ret; + + if ((ret = PUSH_WAIT(push, 1 + ARRAY_SIZE(identity)))) + return ret; + + PUSH_NVSQ(push, NVC57E, 0x0400, identity, ARRAY_SIZE(identity)); + return 0; } static int |