int (*ovly)(struct nv50_head *, struct nv50_head_atom *);
int (*dither)(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 *);
+ int (*or)(struct nv50_head *, struct nv50_head_atom *);
void (*static_wndw_map)(struct nv50_head *, struct nv50_head_atom *);
};
int head907d_curs_clr(struct nv50_head *);
int head907d_ovly(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 *);
+int head907d_or(struct nv50_head *, struct nv50_head_atom *);
extern const struct nv50_head_func head917d;
int head917d_curs_layout(struct nv50_head *, struct nv50_wndw_atom *,
#include <nvif/push507c.h>
-void
+int
head907d_or(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, 0x0404 + (head->base.index * 0x300), 2);
- evo_data(push, asyh->or.depth << 6 |
- asyh->or.nvsync << 4 |
- asyh->or.nhsync << 3 |
- asyh->or.crc_raster);
- evo_data(push, 0x31ec6000 | head->base.index << 25 |
- asyh->mode.interlace);
- 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, NV907D, 0x0404 + (i * 0x300), asyh->or.depth << 6 |
+ asyh->or.nvsync << 4 |
+ asyh->or.nhsync << 3 |
+ asyh->or.crc_raster,
+ 0x0408 + (i * 0x300), 0x31ec6000 |
+ head->base.index << 25 |
+ asyh->mode.interlace);
+ return 0;
}
int
#include <nvif/pushc37b.h>
-static void
+static int
headc37d_or(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;
+ const int i = head->base.index;
u8 depth;
- u32 *push;
-
- if ((push = evo_wait(core, 2))) {
- /*XXX: This is a dirty hack until OR depth handling is
- * improved later for deep colour etc.
- */
- switch (asyh->or.depth) {
- case 6: depth = 5; break;
- case 5: depth = 4; break;
- case 2: depth = 1; break;
- case 0: depth = 4; break;
- default:
- depth = asyh->or.depth;
- WARN_ON(1);
- break;
- }
-
- evo_mthd(push, 0x2004 + (head->base.index * 0x400), 1);
- evo_data(push, depth << 4 |
- asyh->or.nvsync << 3 |
- asyh->or.nhsync << 2 |
- asyh->or.crc_raster);
- evo_kick(push, core);
+ int ret;
+
+ /*XXX: This is a dirty hack until OR depth handling is
+ * improved later for deep colour etc.
+ */
+ switch (asyh->or.depth) {
+ case 6: depth = 5; break;
+ case 5: depth = 4; break;
+ case 2: depth = 1; break;
+ case 0: depth = 4; break;
+ default:
+ depth = asyh->or.depth;
+ WARN_ON(1);
+ break;
}
+
+ if ((ret = PUSH_WAIT(push, 2)))
+ return ret;
+
+ PUSH_NVSQ(push, NVC37D, 0x2004 + (i * 0x400), depth << 4 |
+ asyh->or.nvsync << 3 |
+ asyh->or.nhsync << 2 |
+ asyh->or.crc_raster);
+ return 0;
}
static int
#include <nvif/pushc37b.h>
-static void
+static int
headc57d_or(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;
+ const int i = head->base.index;
u8 depth;
- u32 *push;
-
- if ((push = evo_wait(core, 2))) {
- /*XXX: This is a dirty hack until OR depth handling is
- * improved later for deep colour etc.
- */
- switch (asyh->or.depth) {
- case 6: depth = 5; break;
- case 5: depth = 4; break;
- case 2: depth = 1; break;
- case 0: depth = 4; break;
- default:
- depth = asyh->or.depth;
- WARN_ON(1);
- break;
- }
+ int ret;
- evo_mthd(push, 0x2004 + (head->base.index * 0x400), 1);
- evo_data(push, 0xfc000000 |
- depth << 4 |
- asyh->or.nvsync << 3 |
- asyh->or.nhsync << 2 |
- asyh->or.crc_raster);
- evo_kick(push, core);
+ /*XXX: This is a dirty hack until OR depth handling is
+ * improved later for deep colour etc.
+ */
+ switch (asyh->or.depth) {
+ case 6: depth = 5; break;
+ case 5: depth = 4; break;
+ case 2: depth = 1; break;
+ case 0: depth = 4; break;
+ default:
+ depth = asyh->or.depth;
+ WARN_ON(1);
+ break;
}
+
+ if ((ret = PUSH_WAIT(push, 2)))
+ return ret;
+
+ PUSH_NVSQ(push, NVC57D, 0x2004 + (i * 0x400), 0xfc000000 |
+ depth << 4 |
+ asyh->or.nvsync << 3 |
+ asyh->or.nhsync << 2 |
+ asyh->or.crc_raster);
+ return 0;
}
static int