drm/nouveau/kms/nv50-: convert core head_curs_clr() to new push macros
[linux-2.6-microblaze.git] / drivers / gpu / drm / nouveau / dispnv50 / head827d.c
index 6b1b683..66bacb4 100644 (file)
 
 #include <nvif/push507c.h>
 
-static void
+static int
 head827d_curs_clr(struct nv50_head *head)
 {
-       struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
-       u32 *push;
-       if ((push = evo_wait(core, 4))) {
-               evo_mthd(push, 0x0880 + head->base.index * 0x400, 1);
-               evo_data(push, 0x05000000);
-               evo_mthd(push, 0x089c + head->base.index * 0x400, 1);
-               evo_data(push, 0x00000000);
-               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, 4)))
+               return ret;
+
+       PUSH_NVSQ(push, NV827D, 0x0880 + (i * 0x400), 0x05000000);
+       PUSH_NVSQ(push, NV827D, 0x089c + (i * 0x400), 0x00000000);
+       return 0;
 }
 
 static int