diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/dac907d.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/dac907d.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/dac907d.c b/drivers/gpu/drm/nouveau/dispnv50/dac907d.c index 11e87fa53fac..95efa625b691 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/dac907d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/dac907d.c @@ -21,16 +21,22 @@ */ #include "core.h" -static void +#include <nvif/push507c.h> + +#include <nvhw/class/cl907d.h> + +static int dac907d_ctrl(struct nv50_core *core, int or, u32 ctrl, struct nv50_head_atom *asyh) { - u32 *push; - if ((push = evo_wait(&core->chan, 2))) { - evo_mthd(push, 0x0180 + (or * 0x020), 1); - evo_data(push, ctrl); - evo_kick(push, &core->chan); - } + struct nvif_push *push = core->chan.push; + int ret; + + if ((ret = PUSH_WAIT(push, 2))) + return ret; + + PUSH_MTHD(push, NV907D, DAC_SET_CONTROL(or), ctrl); + return 0; } const struct nv50_outp_func |