Commit c686051a authored by Ben Skeggs's avatar Ben Skeggs

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

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 34cf8cae
...@@ -12,7 +12,7 @@ int base507c_acquire(struct nv50_wndw *, struct nv50_wndw_atom *, ...@@ -12,7 +12,7 @@ int base507c_acquire(struct nv50_wndw *, struct nv50_wndw_atom *,
void base507c_release(struct nv50_wndw *, struct nv50_wndw_atom *, void base507c_release(struct nv50_wndw *, struct nv50_wndw_atom *,
struct nv50_head_atom *); struct nv50_head_atom *);
int base507c_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *); int base507c_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void base507c_sema_clr(struct nv50_wndw *); int base507c_sema_clr(struct nv50_wndw *);
void base507c_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *); void base507c_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void base507c_ntfy_clr(struct nv50_wndw *); void base507c_ntfy_clr(struct nv50_wndw *);
void base507c_xlut_set(struct nv50_wndw *, struct nv50_wndw_atom *); void base507c_xlut_set(struct nv50_wndw *, struct nv50_wndw_atom *);
......
...@@ -153,15 +153,17 @@ base507c_ntfy_reset(struct nouveau_bo *bo, u32 offset) ...@@ -153,15 +153,17 @@ base507c_ntfy_reset(struct nouveau_bo *bo, u32 offset)
nouveau_bo_wr32(bo, offset / 4, 0x00000000); nouveau_bo_wr32(bo, offset / 4, 0x00000000);
} }
void int
base507c_sema_clr(struct nv50_wndw *wndw) base507c_sema_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, 0x0094, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 2)))
evo_kick(push, &wndw->wndw); return ret;
}
PUSH_NVSQ(push, NV507C, 0x0094, 0x00000000);
return 0;
} }
int int
......
...@@ -58,7 +58,7 @@ struct nv50_wndw_func { ...@@ -58,7 +58,7 @@ struct nv50_wndw_func {
struct nv50_wndw_atom *asyw); struct nv50_wndw_atom *asyw);
int (*sema_set)(struct nv50_wndw *, struct nv50_wndw_atom *); int (*sema_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
void (*sema_clr)(struct nv50_wndw *); int (*sema_clr)(struct nv50_wndw *);
void (*ntfy_reset)(struct nouveau_bo *, u32 offset); void (*ntfy_reset)(struct nouveau_bo *, u32 offset);
void (*ntfy_set)(struct nv50_wndw *, struct nv50_wndw_atom *); void (*ntfy_set)(struct nv50_wndw *, struct nv50_wndw_atom *);
void (*ntfy_clr)(struct nv50_wndw *); void (*ntfy_clr)(struct nv50_wndw *);
...@@ -116,7 +116,7 @@ int wndwc37e_acquire(struct nv50_wndw *, struct nv50_wndw_atom *, ...@@ -116,7 +116,7 @@ int wndwc37e_acquire(struct nv50_wndw *, struct nv50_wndw_atom *,
void wndwc37e_release(struct nv50_wndw *, struct nv50_wndw_atom *, void wndwc37e_release(struct nv50_wndw *, struct nv50_wndw_atom *,
struct nv50_head_atom *); struct nv50_head_atom *);
int wndwc37e_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *); int wndwc37e_sema_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void wndwc37e_sema_clr(struct nv50_wndw *); int wndwc37e_sema_clr(struct nv50_wndw *);
void wndwc37e_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *); void wndwc37e_ntfy_set(struct nv50_wndw *, struct nv50_wndw_atom *);
void wndwc37e_ntfy_clr(struct nv50_wndw *); void wndwc37e_ntfy_clr(struct nv50_wndw *);
void wndwc37e_image_clr(struct nv50_wndw *); void wndwc37e_image_clr(struct nv50_wndw *);
......
...@@ -175,15 +175,17 @@ wndwc37e_ntfy_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw) ...@@ -175,15 +175,17 @@ wndwc37e_ntfy_set(struct nv50_wndw *wndw, struct nv50_wndw_atom *asyw)
} }
} }
void int
wndwc37e_sema_clr(struct nv50_wndw *wndw) wndwc37e_sema_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, 0x0218, 1);
evo_data(push, 0x00000000); if ((ret = PUSH_WAIT(push, 2)))
evo_kick(push, &wndw->wndw); return ret;
}
PUSH_NVSQ(push, NVC37E, 0x0218, 0x00000000);
return 0;
} }
int 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