This source file includes following definitions.
- g84_hdmi_ctrl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #include "hdmi.h"
25
26 void
27 g84_hdmi_ctrl(struct nvkm_ior *ior, int head, bool enable, u8 max_ac_packet,
28 u8 rekey, u8 *avi, u8 avi_size, u8 *vendor, u8 vendor_size)
29 {
30 struct nvkm_device *device = ior->disp->engine.subdev.device;
31 const u32 ctrl = 0x40000000 * enable |
32 0x1f000000 |
33 max_ac_packet << 16 |
34 rekey;
35 const u32 hoff = head * 0x800;
36 struct packed_hdmi_infoframe avi_infoframe;
37 struct packed_hdmi_infoframe vendor_infoframe;
38
39 pack_hdmi_infoframe(&avi_infoframe, avi, avi_size);
40 pack_hdmi_infoframe(&vendor_infoframe, vendor, vendor_size);
41
42 if (!(ctrl & 0x40000000)) {
43 nvkm_mask(device, 0x6165a4 + hoff, 0x40000000, 0x00000000);
44 nvkm_mask(device, 0x61653c + hoff, 0x00000001, 0x00000000);
45 nvkm_mask(device, 0x616520 + hoff, 0x00000001, 0x00000000);
46 nvkm_mask(device, 0x616500 + hoff, 0x00000001, 0x00000000);
47 return;
48 }
49
50
51 nvkm_mask(device, 0x616520 + hoff, 0x00000001, 0x00000000);
52 if (avi_size) {
53 nvkm_wr32(device, 0x616528 + hoff, avi_infoframe.header);
54 nvkm_wr32(device, 0x61652c + hoff, avi_infoframe.subpack0_low);
55 nvkm_wr32(device, 0x616530 + hoff, avi_infoframe.subpack0_high);
56 nvkm_wr32(device, 0x616534 + hoff, avi_infoframe.subpack1_low);
57 nvkm_wr32(device, 0x616538 + hoff, avi_infoframe.subpack1_high);
58 nvkm_mask(device, 0x616520 + hoff, 0x00000001, 0x00000001);
59 }
60
61
62 nvkm_mask(device, 0x616500 + hoff, 0x00000001, 0x00000000);
63 nvkm_wr32(device, 0x616508 + hoff, 0x000a0184);
64 nvkm_wr32(device, 0x61650c + hoff, 0x00000071);
65 nvkm_wr32(device, 0x616510 + hoff, 0x00000000);
66 nvkm_mask(device, 0x616500 + hoff, 0x00000001, 0x00000001);
67
68
69 nvkm_mask(device, 0x61653c + hoff, 0x00010001, 0x00010000);
70 if (vendor_size) {
71 nvkm_wr32(device, 0x616544 + hoff, vendor_infoframe.header);
72 nvkm_wr32(device, 0x616548 + hoff, vendor_infoframe.subpack0_low);
73 nvkm_wr32(device, 0x61654c + hoff, vendor_infoframe.subpack0_high);
74
75
76
77 nvkm_mask(device, 0x61653c + hoff, 0x00010001, 0x00010001);
78 }
79
80 nvkm_mask(device, 0x6165d0 + hoff, 0x00070001, 0x00010001);
81 nvkm_mask(device, 0x616568 + hoff, 0x00010101, 0x00000000);
82 nvkm_mask(device, 0x616578 + hoff, 0x80000000, 0x80000000);
83
84
85 nvkm_mask(device, 0x61733c, 0x00100000, 0x00100000);
86 nvkm_mask(device, 0x61733c, 0x10000000, 0x10000000);
87 nvkm_mask(device, 0x61733c, 0x00100000, 0x00000000);
88
89
90 nvkm_mask(device, 0x6165a4 + hoff, 0x5f1f007f, ctrl);
91 }