Commit cfb4120d authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms/nv50-: convert wndw csc_clr() to new push macros

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 72587dca
...@@ -127,15 +127,17 @@ base907c_csc(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw, ...@@ -127,15 +127,17 @@ base907c_csc(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw,
} }
} }
static void static int
base907c_csc_clr(struct nv50_wndw *wndw) base907c_csc_clr(struct nv50_wndw *wndw)
{ {
u32 *push; struct nvif_push *push = wndw->wndw.push;
if ((push = evo_wait(&wndw->wndw, 2))) { int ret;
evo_mthd(push, 0x0140, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 2)))
evo_kick(push, &wndw->wndw); return ret;
}
PUSH_NVSQ(push, NV907C, 0x0140, 0x00000000);
return 0;
} }
static int static int
......
...@@ -68,7 +68,7 @@ struct nv50_wndw_func { ...@@ -68,7 +68,7 @@ struct nv50_wndw_func {
void (*csc)(struct nv50_wndw *, struct nv50_wndw_atom *, void (*csc)(struct nv50_wndw *, struct nv50_wndw_atom *,
const struct drm_color_ctm *); const struct drm_color_ctm *);
int (*csc_set)(struct nv50_wndw *, struct nv50_wndw_atom *); int (*csc_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
void (*csc_clr)(struct nv50_wndw *); int (*csc_clr)(struct nv50_wndw *);
bool ilut_identity; bool ilut_identity;
int ilut_size; int ilut_size;
bool olut_core; bool olut_core;
......
...@@ -29,9 +29,10 @@ ...@@ -29,9 +29,10 @@
#include <nvif/clc37e.h> #include <nvif/clc37e.h>
#include <nvif/pushc37b.h> #include <nvif/pushc37b.h>
static void static int
wndwc37e_csc_clr(struct nv50_wndw *wndw) wndwc37e_csc_clr(struct nv50_wndw *wndw)
{ {
return 0;
} }
static int static int
......
...@@ -61,26 +61,22 @@ wndwc57e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ...@@ -61,26 +61,22 @@ wndwc57e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
evo_kick(push, &wndw->wndw); evo_kick(push, &wndw->wndw);
} }
static void static int
wndwc57e_csc_clr(struct nv50_wndw *wndw) wndwc57e_csc_clr(struct nv50_wndw *wndw)
{ {
u32 *push; struct nvif_push *push = wndw->wndw.push;
if ((push = evo_wait(&wndw->wndw, 13))) { const u32 identity[12] = {
evo_mthd(push, 0x0400, 12); 0x00010000, 0x00000000, 0x00000000, 0x00000000,
evo_data(push, 0x00010000); 0x00000000, 0x00010000, 0x00000000, 0x00000000,
evo_data(push, 0x00000000); 0x00000000, 0x00000000, 0x00010000, 0x00000000,
evo_data(push, 0x00000000); };
evo_data(push, 0x00000000); int ret;
evo_data(push, 0x00000000);
evo_data(push, 0x00010000); if ((ret = PUSH_WAIT(push, 1 + ARRAY_SIZE(identity))))
evo_data(push, 0x00000000); return ret;
evo_data(push, 0x00000000);
evo_data(push, 0x00000000); PUSH_NVSQ(push, NVC57E, 0x0400, identity, ARRAY_SIZE(identity));
evo_data(push, 0x00000000); return 0;
evo_data(push, 0x00010000);
evo_data(push, 0x00000000);
evo_kick(push, &wndw->wndw);
}
} }
static int static int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment