| .. | .. |
|---|
| 22 | 22 | #include "core.h" |
|---|
| 23 | 23 | |
|---|
| 24 | 24 | #include <nvif/class.h> |
|---|
| 25 | +#include <nvif/push507c.h> |
|---|
| 25 | 26 | |
|---|
| 26 | | -static void |
|---|
| 27 | +#include <nvhw/class/cl907d.h> |
|---|
| 28 | + |
|---|
| 29 | +#include <nouveau_bo.h> |
|---|
| 30 | + |
|---|
| 31 | +static int |
|---|
| 27 | 32 | sor907d_ctrl(struct nv50_core *core, int or, u32 ctrl, |
|---|
| 28 | 33 | struct nv50_head_atom *asyh) |
|---|
| 29 | 34 | { |
|---|
| 30 | | - u32 *push; |
|---|
| 31 | | - if ((push = evo_wait(&core->chan, 2))) { |
|---|
| 32 | | - evo_mthd(push, 0x0200 + (or * 0x20), 1); |
|---|
| 33 | | - evo_data(push, ctrl); |
|---|
| 34 | | - evo_kick(push, &core->chan); |
|---|
| 35 | | - } |
|---|
| 35 | + struct nvif_push *push = core->chan.push; |
|---|
| 36 | + int ret; |
|---|
| 37 | + |
|---|
| 38 | + if ((ret = PUSH_WAIT(push, 2))) |
|---|
| 39 | + return ret; |
|---|
| 40 | + |
|---|
| 41 | + PUSH_MTHD(push, NV907D, SOR_SET_CONTROL(or), ctrl); |
|---|
| 42 | + return 0; |
|---|
| 43 | +} |
|---|
| 44 | + |
|---|
| 45 | +static void |
|---|
| 46 | +sor907d_get_caps(struct nv50_disp *disp, struct nouveau_encoder *outp, int or) |
|---|
| 47 | +{ |
|---|
| 48 | + struct nouveau_bo *bo = disp->sync; |
|---|
| 49 | + const int off = or * 2; |
|---|
| 50 | + outp->caps.dp_interlace = |
|---|
| 51 | + NVBO_RV32(bo, off, NV907D_CORE_NOTIFIER_3, CAPABILITIES_CAP_SOR0_20, DP_INTERLACE); |
|---|
| 36 | 52 | } |
|---|
| 37 | 53 | |
|---|
| 38 | 54 | const struct nv50_outp_func |
|---|
| 39 | 55 | sor907d = { |
|---|
| 40 | 56 | .ctrl = sor907d_ctrl, |
|---|
| 57 | + .get_caps = sor907d_get_caps, |
|---|
| 41 | 58 | }; |
|---|