This source file includes following definitions.
- tu102_sor_dp_vcpi
- tu102_sor_dp_links
- tu102_sor_new
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #include "ior.h"
23
24 #include <subdev/timer.h>
25
26 static void
27 tu102_sor_dp_vcpi(struct nvkm_ior *sor, int head,
28 u8 slot, u8 slot_nr, u16 pbn, u16 aligned)
29 {
30 struct nvkm_device *device = sor->disp->engine.subdev.device;
31 const u32 hoff = head * 0x800;
32
33 nvkm_mask(device, 0x61657c + hoff, 0xffffffff, (aligned << 16) | pbn);
34 nvkm_mask(device, 0x616578 + hoff, 0x00003f3f, (slot_nr << 8) | slot);
35 }
36
37 static int
38 tu102_sor_dp_links(struct nvkm_ior *sor, struct nvkm_i2c_aux *aux)
39 {
40 struct nvkm_device *device = sor->disp->engine.subdev.device;
41 const u32 soff = nv50_ior_base(sor);
42 const u32 loff = nv50_sor_link(sor);
43 u32 dpctrl = 0x00000000;
44 u32 clksor = 0x00000000;
45
46 clksor |= sor->dp.bw << 18;
47 dpctrl |= ((1 << sor->dp.nr) - 1) << 16;
48 if (sor->dp.mst)
49 dpctrl |= 0x40000000;
50 if (sor->dp.ef)
51 dpctrl |= 0x00004000;
52
53 nvkm_mask(device, 0x612300 + soff, 0x007c0000, clksor);
54
55
56 nvkm_msec(device, 40, NVKM_DELAY);
57 nvkm_mask(device, 0x612300 + soff, 0x00030000, 0x00010000);
58 nvkm_mask(device, 0x61c10c + loff, 0x00000003, 0x00000001);
59
60 nvkm_mask(device, 0x61c10c + loff, 0x401f4000, dpctrl);
61 return 0;
62 }
63
64 static const struct nvkm_ior_func
65 tu102_sor = {
66 .route = {
67 .get = gm200_sor_route_get,
68 .set = gm200_sor_route_set,
69 },
70 .state = gv100_sor_state,
71 .power = nv50_sor_power,
72 .clock = gf119_sor_clock,
73 .hdmi = {
74 .ctrl = gv100_hdmi_ctrl,
75 .scdc = gm200_hdmi_scdc,
76 },
77 .dp = {
78 .lanes = { 0, 1, 2, 3 },
79 .links = tu102_sor_dp_links,
80 .power = g94_sor_dp_power,
81 .pattern = gm107_sor_dp_pattern,
82 .drive = gm200_sor_dp_drive,
83 .vcpi = tu102_sor_dp_vcpi,
84 .audio = gv100_sor_dp_audio,
85 .audio_sym = gv100_sor_dp_audio_sym,
86 .watermark = gv100_sor_dp_watermark,
87 },
88 .hda = {
89 .hpd = gf119_hda_hpd,
90 .eld = gf119_hda_eld,
91 },
92 };
93
94 int
95 tu102_sor_new(struct nvkm_disp *disp, int id)
96 {
97 return nvkm_ior_new_(&tu102_sor, disp, SOR, id);
98 }