Commit 34838908 authored by Ben Skeggs's avatar Ben Skeggs

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

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 222439eb
...@@ -14,7 +14,7 @@ void base507c_release(struct nv50_wndw *, struct nv50_wndw_atom *, ...@@ -14,7 +14,7 @@ void base507c_release(struct nv50_wndw *, struct nv50_wndw_atom *,
int base507c_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *); int base507c_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *);
int base507c_sema_clr(struct nv50_wndw *); int base507c_sema_clr(struct nv50_wndw *);
int base507c_xlut_set(struct nv50_wndw *, struct nv50_wndw_atom *); int base507c_xlut_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void base507c_xlut_clr(struct nv50_wndw *); int base507c_xlut_clr(struct nv50_wndw *);
void base507c_image_clr(struct nv50_wndw *); void base507c_image_clr(struct nv50_wndw *);
void base507c_update(struct nv50_wndw *, u32 *); void base507c_update(struct nv50_wndw *, u32 *);
......
...@@ -89,15 +89,17 @@ base507c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ...@@ -89,15 +89,17 @@ base507c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
} }
} }
void int
base507c_xlut_clr(struct nv50_wndw *wndw) base507c_xlut_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, 0x00e0, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 2)))
evo_kick(push, &wndw->wndw); return ret;
}
PUSH_NVSQ(push, NV507C, 0x00e0, 0x00000000);
return 0;
} }
int int
......
...@@ -46,19 +46,19 @@ base907c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ...@@ -46,19 +46,19 @@ base907c_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
} }
} }
static void static int
base907c_xlut_clr(struct nv50_wndw *wndw) base907c_xlut_clr(struct nv50_wndw *wndw)
{ {
u32 *push; struct nvif_push *push = wndw->wndw.push;
if ((push = evo_wait(&wndw->wndw, 6))) { int ret;
evo_mthd(push, 0x00e0, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 6)))
evo_mthd(push, 0x00e8, 1); return ret;
evo_data(push, 0x00000000);
evo_mthd(push, 0x00fc, 1); PUSH_NVSQ(push, NV907C, 0x00e0, 0x00000000);
evo_data(push, 0x00000000); PUSH_NVSQ(push, NV907C, 0x00e8, 0x00000000);
evo_kick(push, &wndw->wndw); PUSH_NVSQ(push, NV907C, 0x00fc, 0x00000000);
} return 0;
} }
static int static int
......
...@@ -73,7 +73,7 @@ struct nv50_wndw_func { ...@@ -73,7 +73,7 @@ struct nv50_wndw_func {
int ilut_size; int ilut_size;
bool olut_core; bool olut_core;
int (*xlut_set)(struct nv50_wndw *, struct nv50_wndw_atom *); int (*xlut_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
void (*xlut_clr)(struct nv50_wndw *); int (*xlut_clr)(struct nv50_wndw *);
void (*image_set)(struct nv50_wndw *, struct nv50_wndw_atom *); void (*image_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
void (*image_clr)(struct nv50_wndw *); void (*image_clr)(struct nv50_wndw *);
void (*scale_set)(struct nv50_wndw *, struct nv50_wndw_atom *); void (*scale_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
......
...@@ -48,15 +48,17 @@ wndwc37e_csc_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ...@@ -48,15 +48,17 @@ wndwc37e_csc_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
return 0; return 0;
} }
static void static int
wndwc37e_ilut_clr(struct nv50_wndw *wndw) wndwc37e_ilut_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, 0x02b8, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 2)))
evo_kick(push, &wndw->wndw); return ret;
}
PUSH_NVSQ(push, NVC37E, 0x02b8, 0x00000000);
return 0;
} }
static int static int
......
...@@ -92,15 +92,17 @@ wndwc57e_csc_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ...@@ -92,15 +92,17 @@ wndwc57e_csc_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
return 0; return 0;
} }
static void static int
wndwc57e_ilut_clr(struct nv50_wndw *wndw) wndwc57e_ilut_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, 0x0444, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 2)))
evo_kick(push, &wndw->wndw); return ret;
}
PUSH_NVSQ(push, NVC57E, 0x0444, 0x00000000);
return 0;
} }
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