drm/nouveau/kms/nv50-: convert core head_procamp() to new push macros
[sfrench/cifs-2.6.git] / drivers / gpu / drm / nouveau / dispnv50 / headc57d.c
index a39f7447c8a8f73afb91ae26da447fcacce7e744..751ffefd30553bb26e226ad189b772aee5d0e8df 100644 (file)
@@ -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)
 {
-       struct nv50_dmac *core = &nv50_disp(head->base.base.dev)->core->chan;
-       u32 *push;
-       if ((push = evo_wait(core, 2))) {
-               evo_mthd(push, 0x2000 + (head->base.index * 0x400), 1);
-#if 0
-               evo_data(push, 0x80000000 |
-                              asyh->procamp.sat.sin << 16 |
-                              asyh->procamp.sat.cos << 4);
-#else
-               evo_data(push, 0);
-#endif
-               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, 2)))
+               return ret;
+
+       //TODO:
+       PUSH_NVSQ(push, NVC57D, 0x2000 + (i * 0x400), 0x00000000);
+       return 0;
 }
 
 static int