struct nv50_head_atom *);
int (*curs_format)(struct nv50_head *, struct nv50_wndw_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 (*base)(struct nv50_head *, struct nv50_head_atom *);
void (*ovly)(struct nv50_head *, struct nv50_head_atom *);
int head907d_olut_clr(struct nv50_head *);
int head907d_core_set(struct nv50_head *, struct nv50_head_atom *);
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_ovly(struct nv50_head *, struct nv50_head_atom *);
void head907d_procamp(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 *,
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_dither(struct nv50_head *, struct nv50_head_atom *);
void headc37d_static_wndw_map(struct nv50_head *, struct nv50_head_atom *);
}
}
-static void
+static int
head507d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
{
- struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
- u32 *push;
- if ((push = evo_wait(core, 3))) {
- evo_mthd(push, 0x0880 + head->base.index * 0x400, 2);
- evo_data(push, 0x80000000 | asyh->curs.layout << 26 |
- asyh->curs.format << 24);
- evo_data(push, asyh->curs.offset >> 8);
- evo_kick(push, core);
- }
+ struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
+ const int i = head->base.index;
+ int ret;
+
+ if ((ret = PUSH_WAIT(push, 3)))
+ return ret;
+
+ 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
}
}
-static void
+static int
head827d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
{
- struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
- u32 *push;
- if ((push = evo_wait(core, 5))) {
- evo_mthd(push, 0x0880 + head->base.index * 0x400, 2);
- evo_data(push, 0x80000000 | asyh->curs.layout << 26 |
- asyh->curs.format << 24);
- evo_data(push, asyh->curs.offset >> 8);
- evo_mthd(push, 0x089c + head->base.index * 0x400, 1);
- evo_data(push, asyh->curs.handle);
- evo_kick(push, core);
- }
+ struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
+ const int i = head->base.index;
+ int ret;
+
+ if ((ret = PUSH_WAIT(push, 5)))
+ return ret;
+
+ PUSH_NVSQ(push, NV827D, 0x0880 + (i * 0x400), 0x80000000 |
+ asyh->curs.layout << 26 |
+ 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
}
}
-void
+int
head907d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
{
- struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
- u32 *push;
- if ((push = evo_wait(core, 5))) {
- evo_mthd(push, 0x0480 + head->base.index * 0x300, 2);
- evo_data(push, 0x80000000 | asyh->curs.layout << 26 |
- asyh->curs.format << 24);
- evo_data(push, asyh->curs.offset >> 8);
- evo_mthd(push, 0x048c + head->base.index * 0x300, 1);
- evo_data(push, asyh->curs.handle);
- evo_kick(push, core);
- }
+ struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
+ const int i = head->base.index;
+ int ret;
+
+ if ((ret = PUSH_WAIT(push, 5)))
+ return ret;
+
+ PUSH_NVSQ(push, NV907D, 0x0480 + (i * 0x300), 0x80000000 |
+ asyh->curs.layout << 26 |
+ asyh->curs.format << 24,
+ 0x0484 + (i * 0x300), asyh->curs.offset >> 8);
+ PUSH_NVSQ(push, NV907D, 0x048c + (i * 0x300), asyh->curs.handle);
+ return 0;
}
int
}
}
-void
+int
headc37d_curs_set(struct nv50_head *head, struct nv50_head_atom *asyh)
{
- struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
- u32 *push;
- if ((push = evo_wait(core, 7))) {
- evo_mthd(push, 0x209c + head->base.index * 0x400, 2);
- evo_data(push, 0x80000000 |
- asyh->curs.layout << 8 |
- asyh->curs.format << 0);
- evo_data(push, 0x000072ff);
- evo_mthd(push, 0x2088 + head->base.index * 0x400, 1);
- evo_data(push, asyh->curs.handle);
- evo_mthd(push, 0x2090 + head->base.index * 0x400, 1);
- evo_data(push, asyh->curs.offset >> 8);
- evo_kick(push, core);
- }
+ struct nvif_push *push = nv50_disp(head->base.base.dev)->core->chan.push;
+ const int i = head->base.index;
+ int ret;
+
+ if ((ret = PUSH_WAIT(push, 7)))
+ return ret;
+
+ PUSH_NVSQ(push, NVC37D, 0x209c + (i * 0x400), 0x80000000 |
+ asyh->curs.layout << 8 |
+ asyh->curs.format << 0,
+ 0x20a0 + (i * 0x400), 0x000072ff);
+ PUSH_NVSQ(push, NVC37D, 0x2088 + (i * 0x400), asyh->curs.handle);
+ PUSH_NVSQ(push, NVC37D, 0x2090 + (i * 0x400), asyh->curs.offset >> 8);
+ return 0;
}
int