drm/nouveau/kms/nv50-: convert core head_curs_set() to new push macros
Signed-off-by: Ben Skeggs <bskeggs@redhat.com> Reviewed-by: Lyude Paul <lyude@redhat.com>
This commit is contained in:
parent
aabe253e38
commit
9549c14b32
@ -39,7 +39,7 @@ struct nv50_head_func {
|
|||||||
struct nv50_head_atom *);
|
struct nv50_head_atom *);
|
||||||
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 *);
|
||||||
void (*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 *);
|
void (*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 *);
|
||||||
@ -74,7 +74,7 @@ int head907d_olut_set(struct nv50_head *, struct nv50_head_atom *);
|
|||||||
int head907d_olut_clr(struct nv50_head *);
|
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 *);
|
||||||
void 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 *);
|
void 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 *);
|
||||||
@ -88,7 +88,7 @@ extern const struct nv50_head_func headc37d;
|
|||||||
int headc37d_view(struct nv50_head *, struct nv50_head_atom *);
|
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 *);
|
||||||
void 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 *);
|
void 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 *);
|
||||||
|
@ -117,18 +117,21 @@ head507d_curs_clr(struct nv50_head *head)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
head507d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
|
head507d_curs_set(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, 3))) {
|
int ret;
|
||||||
evo_mthd(push, 0x0880 + head->base.index * 0x400, 2);
|
|
||||||
evo_data(push, 0x80000000 | asyh->curs.layout << 26 |
|
if ((ret = PUSH_WAIT(push, 3)))
|
||||||
asyh->curs.format << 24);
|
return ret;
|
||||||
evo_data(push, asyh->curs.offset >> 8);
|
|
||||||
evo_kick(push, core);
|
PUSH_NVSQ(push, NV507D, 0x0880 + (i * 0x400), 0x80000000 |
|
||||||
}
|
asyh->curs.layout << 26 |
|
||||||
|
asyh->curs.format << 24,
|
||||||
|
0x0884 + (i * 0x400), asyh->curs.offset >> 8);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -38,20 +38,22 @@ head827d_curs_clr(struct nv50_head *head)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
head827d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
|
head827d_curs_set(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, 5))) {
|
int ret;
|
||||||
evo_mthd(push, 0x0880 + head->base.index * 0x400, 2);
|
|
||||||
evo_data(push, 0x80000000 | asyh->curs.layout << 26 |
|
if ((ret = PUSH_WAIT(push, 5)))
|
||||||
asyh->curs.format << 24);
|
return ret;
|
||||||
evo_data(push, asyh->curs.offset >> 8);
|
|
||||||
evo_mthd(push, 0x089c + head->base.index * 0x400, 1);
|
PUSH_NVSQ(push, NV827D, 0x0880 + (i * 0x400), 0x80000000 |
|
||||||
evo_data(push, asyh->curs.handle);
|
asyh->curs.layout << 26 |
|
||||||
evo_kick(push, core);
|
asyh->curs.format << 24,
|
||||||
}
|
0x0884 + (i * 0x400), asyh->curs.offset >> 8);
|
||||||
|
PUSH_NVSQ(push, NV827D, 0x089c + (i * 0x400), asyh->curs.handle);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -144,20 +144,22 @@ head907d_curs_clr(struct nv50_head *head)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
head907d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
|
head907d_curs_set(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, 5))) {
|
int ret;
|
||||||
evo_mthd(push, 0x0480 + head->base.index * 0x300, 2);
|
|
||||||
evo_data(push, 0x80000000 | asyh->curs.layout << 26 |
|
if ((ret = PUSH_WAIT(push, 5)))
|
||||||
asyh->curs.format << 24);
|
return ret;
|
||||||
evo_data(push, asyh->curs.offset >> 8);
|
|
||||||
evo_mthd(push, 0x048c + head->base.index * 0x300, 1);
|
PUSH_NVSQ(push, NV907D, 0x0480 + (i * 0x300), 0x80000000 |
|
||||||
evo_data(push, asyh->curs.handle);
|
asyh->curs.layout << 26 |
|
||||||
evo_kick(push, core);
|
asyh->curs.format << 24,
|
||||||
}
|
0x0484 + (i * 0x300), asyh->curs.offset >> 8);
|
||||||
|
PUSH_NVSQ(push, NV907D, 0x048c + (i * 0x300), asyh->curs.handle);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -98,23 +98,23 @@ headc37d_curs_clr(struct nv50_head *head)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
headc37d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
|
headc37d_curs_set(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, 7))) {
|
int ret;
|
||||||
evo_mthd(push, 0x209c + head->base.index * 0x400, 2);
|
|
||||||
evo_data(push, 0x80000000 |
|
if ((ret = PUSH_WAIT(push, 7)))
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
PUSH_NVSQ(push, NVC37D, 0x209c + (i * 0x400), 0x80000000 |
|
||||||
asyh->curs.layout << 8 |
|
asyh->curs.layout << 8 |
|
||||||
asyh->curs.format << 0);
|
asyh->curs.format << 0,
|
||||||
evo_data(push, 0x000072ff);
|
0x20a0 + (i * 0x400), 0x000072ff);
|
||||||
evo_mthd(push, 0x2088 + head->base.index * 0x400, 1);
|
PUSH_NVSQ(push, NVC37D, 0x2088 + (i * 0x400), asyh->curs.handle);
|
||||||
evo_data(push, asyh->curs.handle);
|
PUSH_NVSQ(push, NVC37D, 0x2090 + (i * 0x400), asyh->curs.offset >> 8);
|
||||||
evo_mthd(push, 0x2090 + head->base.index * 0x400, 1);
|
return 0;
|
||||||
evo_data(push, asyh->curs.offset >> 8);
|
|
||||||
evo_kick(push, core);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Loading…
Reference in New Issue
Block a user