Commit 246db5fd authored by Ben Skeggs's avatar Ben Skeggs

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

Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
Reviewed-by: default avatarLyude Paul <lyude@redhat.com>
parent 2f819f2b
...@@ -44,7 +44,7 @@ struct nv50_head_func { ...@@ -44,7 +44,7 @@ struct nv50_head_func {
int (*base)(struct nv50_head *, struct nv50_head_atom *); int (*base)(struct nv50_head *, struct nv50_head_atom *);
int (*ovly)(struct nv50_head *, struct nv50_head_atom *); int (*ovly)(struct nv50_head *, struct nv50_head_atom *);
int (*dither)(struct nv50_head *, struct nv50_head_atom *); int (*dither)(struct nv50_head *, struct nv50_head_atom *);
void (*procamp)(struct nv50_head *, struct nv50_head_atom *); int (*procamp)(struct nv50_head *, struct nv50_head_atom *);
void (*or)(struct nv50_head *, struct nv50_head_atom *); void (*or)(struct nv50_head *, struct nv50_head_atom *);
void (*static_wndw_map)(struct nv50_head *, struct nv50_head_atom *); void (*static_wndw_map)(struct nv50_head *, struct nv50_head_atom *);
}; };
...@@ -62,7 +62,7 @@ int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *, ...@@ -62,7 +62,7 @@ int head507d_curs_format(struct nv50_head *, struct nv50_wndw_atom *,
int head507d_base(struct nv50_head *, struct nv50_head_atom *); int head507d_base(struct nv50_head *, struct nv50_head_atom *);
int head507d_ovly(struct nv50_head *, struct nv50_head_atom *); int head507d_ovly(struct nv50_head *, struct nv50_head_atom *);
int head507d_dither(struct nv50_head *, struct nv50_head_atom *); int head507d_dither(struct nv50_head *, struct nv50_head_atom *);
void head507d_procamp(struct nv50_head *, struct nv50_head_atom *); int head507d_procamp(struct nv50_head *, struct nv50_head_atom *);
extern const struct nv50_head_func head827d; extern const struct nv50_head_func head827d;
...@@ -77,7 +77,7 @@ int head907d_core_clr(struct nv50_head *); ...@@ -77,7 +77,7 @@ 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 *);
int head907d_curs_clr(struct nv50_head *); int head907d_curs_clr(struct nv50_head *);
int head907d_ovly(struct nv50_head *, struct nv50_head_atom *); int head907d_ovly(struct nv50_head *, struct nv50_head_atom *);
void head907d_procamp(struct nv50_head *, struct nv50_head_atom *); int 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 *);
extern const struct nv50_head_func head917d; extern const struct nv50_head_func head917d;
......
...@@ -24,17 +24,19 @@ ...@@ -24,17 +24,19 @@
#include <nvif/push507c.h> #include <nvif/push507c.h>
void int
head507d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh) head507d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
{ {
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, 0x08a8 + (head->base.index * 0x400), 1);
evo_data(push, asyh->procamp.sat.sin << 20 | if ((ret = PUSH_WAIT(push, 2)))
return ret;
PUSH_NVSQ(push, NV507D, 0x08a8 + (i * 0x400), asyh->procamp.sat.sin << 20 |
asyh->procamp.sat.cos << 8); asyh->procamp.sat.cos << 8);
evo_kick(push, core); return 0;
}
} }
int int
......
...@@ -48,17 +48,19 @@ head907d_or(struct nv50_head *head, struct nv50_head_atom *asyh) ...@@ -48,17 +48,19 @@ head907d_or(struct nv50_head *head, struct nv50_head_atom *asyh)
} }
} }
void int
head907d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh) head907d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
{ {
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, 0x0498 + (head->base.index * 0x300), 1);
evo_data(push, asyh->procamp.sat.sin << 20 | if ((ret = PUSH_WAIT(push, 2)))
return ret;
PUSH_NVSQ(push, NV907D, 0x0498 + (i * 0x300), asyh->procamp.sat.sin << 20 |
asyh->procamp.sat.cos << 8); asyh->procamp.sat.cos << 8);
evo_kick(push, core); return 0;
}
} }
static int static int
......
...@@ -56,18 +56,20 @@ headc37d_or(struct nv50_head *head, struct nv50_head_atom *asyh) ...@@ -56,18 +56,20 @@ headc37d_or(struct nv50_head *head, struct nv50_head_atom *asyh)
} }
} }
static void static int
headc37d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh) headc37d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
{ {
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, 0x2000 + (head->base.index * 0x400), 1);
evo_data(push, 0x80000000 | if ((ret = PUSH_WAIT(push, 2)))
return ret;
PUSH_NVSQ(push, NVC37D, 0x2000 + (i * 0x400), 0x80000000 |
asyh->procamp.sat.sin << 16 | asyh->procamp.sat.sin << 16 |
asyh->procamp.sat.cos << 4); asyh->procamp.sat.cos << 4);
evo_kick(push, core); return 0;
}
} }
int int
......
...@@ -57,22 +57,19 @@ headc57d_or(struct nv50_head *head, struct nv50_head_atom *asyh) ...@@ -57,22 +57,19 @@ headc57d_or(struct nv50_head *head, struct nv50_head_atom *asyh)
} }
} }
static void static int
headc57d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh) headc57d_procamp(struct nv50_head *head, struct nv50_head_atom *asyh)
{ {
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, 0x2000 + (head->base.index * 0x400), 1);
#if 0 if ((ret = PUSH_WAIT(push, 2)))
evo_data(push, 0x80000000 | return ret;
asyh->procamp.sat.sin << 16 |
asyh->procamp.sat.cos << 4); //TODO:
#else PUSH_NVSQ(push, NVC57D, 0x2000 + (i * 0x400), 0x00000000);
evo_data(push, 0); return 0;
#endif
evo_kick(push, core);
}
} }
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