diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2020-06-20 01:39:21 +0300 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2020-07-24 11:50:52 +0300 |
commit | 72587dca9658a0428518e658247c4490a0e0a09f (patch) | |
tree | 654478d30d2023fde73ab1d129bc158391f1b4b4 /drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c | |
parent | bcae99c282aad70d5aaf7b34f878c465a675089e (diff) | |
download | linux-72587dca9658a0428518e658247c4490a0e0a09f.tar.xz |
drm/nouveau/kms/nv50-: convert wndw csc_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.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c b/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c index 1d64741595ba..9d155a7f14bf 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c +++ b/drivers/gpu/drm/nouveau/dispnv50/wndwc57e.c @@ -27,6 +27,7 @@ #include <nouveau_bo.h> #include <nvif/clc37e.h> +#include <nvif/pushc37b.h> static void wndwc57e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) @@ -82,16 +83,17 @@ wndwc57e_csc_clr(struct nv50_wndw *wndw) } } -static void +static int wndwc57e_csc_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) { - u32 *push, i; - if ((push = evo_wait(&wndw->wndw, 13))) { - evo_mthd(push, 0x0400, 12); - for (i = 0; i < 12; i++) - evo_data(push, asyw->csc.matrix[i]); - evo_kick(push, &wndw->wndw); - } + struct nvif_push *push = wndw->wndw.push; + int ret; + + if ((ret = PUSH_WAIT(push, 13))) + return ret; + + PUSH_NVSQ(push, NVC57E, 0x0400, asyw->csc.matrix, 12); + return 0; } static void |