diff options
Diffstat (limited to 'drivers/gpu/drm/nouveau/dispnv50/sor907d.c')
-rw-r--r-- | drivers/gpu/drm/nouveau/dispnv50/sor907d.c | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/drivers/gpu/drm/nouveau/dispnv50/sor907d.c b/drivers/gpu/drm/nouveau/dispnv50/sor907d.c index 9577ccf1c809..c86cd8fa61d6 100644 --- a/drivers/gpu/drm/nouveau/dispnv50/sor907d.c +++ b/drivers/gpu/drm/nouveau/dispnv50/sor907d.c @@ -21,28 +21,34 @@ */ #include "core.h" -#include <nouveau_bo.h> #include <nvif/class.h> +#include <nvif/push507c.h> -static void +#include <nvhw/class/cl907d.h> + +#include <nouveau_bo.h> + +static int sor907d_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, 0x0200 + (or * 0x20), 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, SOR_SET_CONTROL(or), ctrl); + return 0; } static void sor907d_get_caps(struct nv50_disp *disp, struct nouveau_encoder *outp, int or) { + struct nouveau_bo *bo = disp->sync; const int off = or * 2; - u32 tmp = nouveau_bo_rd32(disp->sync, 0x000014 + off); - - outp->caps.dp_interlace = !!(tmp & 0x04000000); + outp->caps.dp_interlace = + NVBO_RV32(bo, off, NV907D_CORE_NOTIFIER_3, CAPABILITIES_CAP_SOR0_20, DP_INTERLACE); } const struct nv50_outp_func |