Commit 8944d8b3 authored by Ben Skeggs's avatar Ben Skeggs

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

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 6d6e11e2
...@@ -15,7 +15,6 @@ int base507c_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *); ...@@ -15,7 +15,6 @@ 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 *);
int base507c_xlut_clr(struct nv50_wndw *); int base507c_xlut_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 *);
int base827c_new(struct nouveau_drm *, int, s32, struct nv50_wndw **); int base827c_new(struct nouveau_drm *, int, s32, struct nv50_wndw **);
......
...@@ -43,17 +43,18 @@ base507c_update(struct nv50_wndw *wndw, u32 *interlock) ...@@ -43,17 +43,18 @@ base507c_update(struct nv50_wndw *wndw, u32 *interlock)
} }
} }
void int
base507c_image_clr(struct nv50_wndw *wndw) base507c_image_clr(struct nv50_wndw *wndw)
{ {
u32 *push; struct nvif_push *push = wndw->wndw.push;
if ((push = evo_wait(&wndw->wndw, 4))) { int ret;
evo_mthd(push, 0x0084, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 4)))
evo_mthd(push, 0x00c0, 1); return ret;
evo_data(push, 0x00000000);
evo_kick(push, &wndw->wndw); PUSH_NVSQ(push, NV507C, 0x0084, 0x00000000);
} PUSH_NVSQ(push, NV507C, 0x00c0, 0x00000000);
return 0;
} }
static int static int
......
...@@ -10,7 +10,6 @@ int ovly507e_acquire(struct nv50_wndw *, struct nv50_wndw_atom *, ...@@ -10,7 +10,6 @@ int ovly507e_acquire(struct nv50_wndw *, struct nv50_wndw_atom *,
struct nv50_head_atom *); struct nv50_head_atom *);
void ovly507e_release(struct nv50_wndw *, struct nv50_wndw_atom *, void ovly507e_release(struct nv50_wndw *, struct nv50_wndw_atom *,
struct nv50_head_atom *); struct nv50_head_atom *);
void ovly507e_image_clr(struct nv50_wndw *);
void ovly507e_scale_set(struct nv50_wndw *, struct nv50_wndw_atom *); void ovly507e_scale_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void ovly507e_update(struct nv50_wndw *, u32 *); void ovly507e_update(struct nv50_wndw *, u32 *);
......
...@@ -54,19 +54,6 @@ ovly507e_scale_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ...@@ -54,19 +54,6 @@ ovly507e_scale_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
} }
} }
void
ovly507e_image_clr(struct nv50_wndw *wndw)
{
u32 *push;
if ((push = evo_wait(&wndw->wndw, 4))) {
evo_mthd(push, 0x0084, 1);
evo_data(push, 0x00000000);
evo_mthd(push, 0x00c0, 1);
evo_data(push, 0x00000000);
evo_kick(push, &wndw->wndw);
}
}
static int static int
ovly507e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ovly507e_image_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
{ {
...@@ -127,7 +114,7 @@ ovly507e = { ...@@ -127,7 +114,7 @@ ovly507e = {
.ntfy_reset = base507c_ntfy_reset, .ntfy_reset = base507c_ntfy_reset,
.ntfy_wait_begun = base507c_ntfy_wait_begun, .ntfy_wait_begun = base507c_ntfy_wait_begun,
.image_set = ovly507e_image_set, .image_set = ovly507e_image_set,
.image_clr = ovly507e_image_clr, .image_clr = base507c_image_clr,
.scale_set = ovly507e_scale_set, .scale_set = ovly507e_scale_set,
.update = ovly507e_update, .update = ovly507e_update,
}; };
......
...@@ -81,7 +81,7 @@ ovly827e = { ...@@ -81,7 +81,7 @@ ovly827e = {
.ntfy_reset = ovly827e_ntfy_reset, .ntfy_reset = ovly827e_ntfy_reset,
.ntfy_wait_begun = ovly827e_ntfy_wait_begun, .ntfy_wait_begun = ovly827e_ntfy_wait_begun,
.image_set = ovly827e_image_set, .image_set = ovly827e_image_set,
.image_clr = ovly507e_image_clr, .image_clr = base507c_image_clr,
.scale_set = ovly507e_scale_set, .scale_set = ovly507e_scale_set,
.update = ovly507e_update, .update = ovly507e_update,
}; };
......
...@@ -56,7 +56,7 @@ ovly907e = { ...@@ -56,7 +56,7 @@ ovly907e = {
.ntfy_reset = ovly827e_ntfy_reset, .ntfy_reset = ovly827e_ntfy_reset,
.ntfy_wait_begun = ovly827e_ntfy_wait_begun, .ntfy_wait_begun = ovly827e_ntfy_wait_begun,
.image_set = ovly907e_image_set, .image_set = ovly907e_image_set,
.image_clr = ovly507e_image_clr, .image_clr = base507c_image_clr,
.scale_set = ovly507e_scale_set, .scale_set = ovly507e_scale_set,
.update = ovly507e_update, .update = ovly507e_update,
}; };
......
...@@ -75,7 +75,7 @@ struct nv50_wndw_func { ...@@ -75,7 +75,7 @@ struct nv50_wndw_func {
int (*xlut_set)(struct nv50_wndw *, struct nv50_wndw_atom *); int (*xlut_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
int (*xlut_clr)(struct nv50_wndw *); int (*xlut_clr)(struct nv50_wndw *);
int (*image_set)(struct nv50_wndw *, struct nv50_wndw_atom *); int (*image_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
void (*image_clr)(struct nv50_wndw *); int (*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 *);
void (*blend_set)(struct nv50_wndw *, struct nv50_wndw_atom *); void (*blend_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
...@@ -88,6 +88,7 @@ void base507c_ntfy_reset(struct nouveau_bo *, u32); ...@@ -88,6 +88,7 @@ void base507c_ntfy_reset(struct nouveau_bo *, u32);
int base507c_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *); int base507c_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *);
int base507c_ntfy_clr(struct nv50_wndw *); int base507c_ntfy_clr(struct nv50_wndw *);
int base507c_ntfy_wait_begun(struct nouveau_bo *, u32, struct nvif_device *); int base507c_ntfy_wait_begun(struct nouveau_bo *, u32, struct nvif_device *);
int base507c_image_clr(struct nv50_wndw *);
void base907c_csc(struct nv50_wndw *, struct nv50_wndw_atom *, void base907c_csc(struct nv50_wndw *, struct nv50_wndw_atom *,
const struct drm_color_ctm *); const struct drm_color_ctm *);
...@@ -121,7 +122,7 @@ int wndwc37e_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *); ...@@ -121,7 +122,7 @@ int wndwc37e_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *);
int wndwc37e_sema_clr(struct nv50_wndw *); int wndwc37e_sema_clr(struct nv50_wndw *);
int wndwc37e_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *); int wndwc37e_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *);
int wndwc37e_ntfy_clr(struct nv50_wndw *); int wndwc37e_ntfy_clr(struct nv50_wndw *);
void wndwc37e_image_clr(struct nv50_wndw *); int wndwc37e_image_clr(struct nv50_wndw *);
void wndwc37e_blend_set(struct nv50_wndw *, struct nv50_wndw_atom *); void wndwc37e_blend_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void wndwc37e_update(struct nv50_wndw *, u32 *); void wndwc37e_update(struct nv50_wndw *, u32 *);
......
...@@ -112,17 +112,18 @@ wndwc37e_blend_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ...@@ -112,17 +112,18 @@ wndwc37e_blend_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
} }
} }
void int
wndwc37e_image_clr(struct nv50_wndw *wndw) wndwc37e_image_clr(struct nv50_wndw *wndw)
{ {
u32 *push; struct nvif_push *push = wndw->wndw.push;
if ((push = evo_wait(&wndw->wndw, 4))) { int ret;
evo_mthd(push, 0x0308, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 4)))
evo_mthd(push, 0x0240, 1); return ret;
evo_data(push, 0x00000000);
evo_kick(push, &wndw->wndw); PUSH_NVSQ(push, NVC37E, 0x0308, 0x00000000);
} PUSH_NVSQ(push, NVC37E, 0x0240, 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