forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/gpu/drm/nouveau/dispnv50/dac907d.c
....@@ -21,16 +21,22 @@
2121 */
2222 #include "core.h"
2323
24
-static void
24
+#include <nvif/push507c.h>
25
+
26
+#include <nvhw/class/cl907d.h>
27
+
28
+static int
2529 dac907d_ctrl(struct nv50_core *core, int or, u32 ctrl,
2630 struct nv50_head_atom *asyh)
2731 {
28
- u32 *push;
29
- if ((push = evo_wait(&core->chan, 2))) {
30
- evo_mthd(push, 0x0180 + (or * 0x020), 1);
31
- evo_data(push, ctrl);
32
- evo_kick(push, &core->chan);
33
- }
32
+ struct nvif_push *push = core->chan.push;
33
+ int ret;
34
+
35
+ if ((ret = PUSH_WAIT(push, 2)))
36
+ return ret;
37
+
38
+ PUSH_MTHD(push, NV907D, DAC_SET_CONTROL(or), ctrl);
39
+ return 0;
3440 }
3541
3642 const struct nv50_outp_func