.. | .. |
---|
21 | 21 | */ |
---|
22 | 22 | #include "core.h" |
---|
23 | 23 | |
---|
24 | | -static void |
---|
| 24 | +#include <nvif/pushc37b.h> |
---|
| 25 | + |
---|
| 26 | +#include <nvhw/class/clc37d.h> |
---|
| 27 | + |
---|
| 28 | +static int |
---|
25 | 29 | sorc37d_ctrl(struct nv50_core *core, int or, u32 ctrl, |
---|
26 | 30 | struct nv50_head_atom *asyh) |
---|
27 | 31 | { |
---|
28 | | - u32 *push; |
---|
29 | | - if ((push = evo_wait(&core->chan, 2))) { |
---|
30 | | - evo_mthd(push, 0x0300 + (or * 0x20), 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, NVC37D, SOR_SET_CONTROL(or), ctrl); |
---|
| 39 | + return 0; |
---|
| 40 | +} |
---|
| 41 | + |
---|
| 42 | +static void |
---|
| 43 | +sorc37d_get_caps(struct nv50_disp *disp, struct nouveau_encoder *outp, int or) |
---|
| 44 | +{ |
---|
| 45 | + u32 tmp = nvif_rd32(&disp->caps, 0x000144 + (or * 8)); |
---|
| 46 | + |
---|
| 47 | + outp->caps.dp_interlace = !!(tmp & 0x04000000); |
---|
34 | 48 | } |
---|
35 | 49 | |
---|
36 | 50 | const struct nv50_outp_func |
---|
37 | 51 | sorc37d = { |
---|
38 | 52 | .ctrl = sorc37d_ctrl, |
---|
| 53 | + .get_caps = sorc37d_get_caps, |
---|
39 | 54 | }; |
---|