Commit bc5af56a authored by Ben Skeggs's avatar Ben Skeggs

drm/nouveau/kms/nv50-: convert core head_curs_clr() to new push macros

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 9549c14b
...@@ -40,7 +40,7 @@ struct nv50_head_func { ...@@ -40,7 +40,7 @@ struct nv50_head_func {
int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *, int (*curs_format)(struct nv50_head *, struct nv50_wndw_atom *,
struct nv50_head_atom *); struct nv50_head_atom *);
int (*curs_set)(struct nv50_head *, struct nv50_head_atom *); int (*curs_set)(struct nv50_head *, struct nv50_head_atom *);
void (*curs_clr)(struct nv50_head *); int (*curs_clr)(struct nv50_head *);
void (*base)(struct nv50_head *, struct nv50_head_atom *); void (*base)(struct nv50_head *, struct nv50_head_atom *);
void (*ovly)(struct nv50_head *, struct nv50_head_atom *); void (*ovly)(struct nv50_head *, struct nv50_head_atom *);
void (*dither)(struct nv50_head *, struct nv50_head_atom *); void (*dither)(struct nv50_head *, struct nv50_head_atom *);
...@@ -75,7 +75,7 @@ int head907d_olut_clr(struct nv50_head *); ...@@ -75,7 +75,7 @@ int head907d_olut_clr(struct nv50_head *);
int head907d_core_set(struct nv50_head *, struct nv50_head_atom *); int head907d_core_set(struct nv50_head *, struct nv50_head_atom *);
int head907d_core_clr(struct nv50_head *); int head907d_core_clr(struct nv50_head *);
int head907d_curs_set(struct nv50_head *, struct nv50_head_atom *); int head907d_curs_set(struct nv50_head *, struct nv50_head_atom *);
void head907d_curs_clr(struct nv50_head *); int head907d_curs_clr(struct nv50_head *);
void head907d_ovly(struct nv50_head *, struct nv50_head_atom *); void head907d_ovly(struct nv50_head *, struct nv50_head_atom *);
void head907d_procamp(struct nv50_head *, struct nv50_head_atom *); void head907d_procamp(struct nv50_head *, struct nv50_head_atom *);
void head907d_or(struct nv50_head *, struct nv50_head_atom *); void head907d_or(struct nv50_head *, struct nv50_head_atom *);
...@@ -89,7 +89,7 @@ int headc37d_view(struct nv50_head *, struct nv50_head_atom *); ...@@ -89,7 +89,7 @@ int headc37d_view(struct nv50_head *, struct nv50_head_atom *);
int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *, int headc37d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
struct nv50_head_atom *); struct nv50_head_atom *);
int headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *); int headc37d_curs_set(struct nv50_head *, struct nv50_head_atom *);
void headc37d_curs_clr(struct nv50_head *); int headc37d_curs_clr(struct nv50_head *);
void headc37d_dither(struct nv50_head *, struct nv50_head_atom *); void headc37d_dither(struct nv50_head *, struct nv50_head_atom *);
void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *); void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *);
......
...@@ -105,16 +105,18 @@ head507d_base(struct nv50_head *head, struct nv50_head_atom *asyh) ...@@ -105,16 +105,18 @@ head507d_base(struct nv50_head *head, struct nv50_head_atom *asyh)
} }
} }
static void static int
head507d_curs_clr(struct nv50_head *head) head507d_curs_clr(struct nv50_head *head)
{ {
struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
u32 *push; const int i = head->base.index;
if ((push = evo_wait(core, 2))) { int ret;
evo_mthd(push, 0x0880 + head->base.index * 0x400, 1);
evo_data(push, 0x05000000); if ((ret = PUSH_WAIT(push, 2)))
evo_kick(push, core); return ret;
}
PUSH_NVSQ(push, NV507D, 0x0880 + (i * 0x400), 0x05000000);
return 0;
} }
static int static int
......
...@@ -24,18 +24,19 @@ ...@@ -24,18 +24,19 @@
#include <nvif/push507c.h> #include <nvif/push507c.h>
static void static int
head827d_curs_clr(struct nv50_head *head) head827d_curs_clr(struct nv50_head *head)
{ {
struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
u32 *push; const int i = head->base.index;
if ((push = evo_wait(core, 4))) { int ret;
evo_mthd(push, 0x0880 + head->base.index * 0x400, 1);
evo_data(push, 0x05000000); if ((ret = PUSH_WAIT(push, 4)))
evo_mthd(push, 0x089c + head->base.index * 0x400, 1); return ret;
evo_data(push, 0x00000000);
evo_kick(push, core); PUSH_NVSQ(push, NV827D, 0x0880 + (i * 0x400), 0x05000000);
} PUSH_NVSQ(push, NV827D, 0x089c + (i * 0x400), 0x00000000);
return 0;
} }
static int static int
......
...@@ -130,18 +130,19 @@ head907d_base(struct nv50_head *head, struct nv50_head_atom *asyh) ...@@ -130,18 +130,19 @@ head907d_base(struct nv50_head *head, struct nv50_head_atom *asyh)
} }
} }
void int
head907d_curs_clr(struct nv50_head *head) head907d_curs_clr(struct nv50_head *head)
{ {
struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
u32 *push; const int i = head->base.index;
if ((push = evo_wait(core, 4))) { int ret;
evo_mthd(push, 0x0480 + head->base.index * 0x300, 1);
evo_data(push, 0x05000000); if ((ret = PUSH_WAIT(push, 4)))
evo_mthd(push, 0x048c + head->base.index * 0x300, 1); return ret;
evo_data(push, 0x00000000);
evo_kick(push, core); PUSH_NVSQ(push, NV907D, 0x0480 + (i * 0x300), 0x05000000);
} PUSH_NVSQ(push, NV907D, 0x048c + (i * 0x300), 0x00000000);
return 0;
} }
int int
......
...@@ -84,18 +84,19 @@ headc37d_dither(struct nv50_head *head, struct nv50_head_atom *asyh) ...@@ -84,18 +84,19 @@ headc37d_dither(struct nv50_head *head, struct nv50_head_atom *asyh)
} }
} }
void int
headc37d_curs_clr(struct nv50_head *head) headc37d_curs_clr(struct nv50_head *head)
{ {
struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan; struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
u32 *push; const int i = head->base.index;
if ((push = evo_wait(core, 4))) { int ret;
evo_mthd(push, 0x209c + head->base.index * 0x400, 1);
evo_data(push, 0x000000cf); if ((ret = PUSH_WAIT(push, 4)))
evo_mthd(push, 0x2088 + head->base.index * 0x400, 1); return ret;
evo_data(push, 0x00000000);
evo_kick(push, core); PUSH_NVSQ(push, NVC37D, 0x209c + (i * 0x400), 0x000000cf);
} PUSH_NVSQ(push, NVC37D, 0x2088 + (i * 0x400), 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