xref: /openbmc/linux/drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c (revision 7ae9fb1b7ecbb5d85d07857943f677fd1a559b18)
1878da15aSBen Skeggs /*
2878da15aSBen Skeggs  * Copyright 2012 Red Hat Inc.
3878da15aSBen Skeggs  *
4878da15aSBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
5878da15aSBen Skeggs  * copy of this software and associated documentation files (the "Software"),
6878da15aSBen Skeggs  * to deal in the Software without restriction, including without limitation
7878da15aSBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8878da15aSBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
9878da15aSBen Skeggs  * Software is furnished to do so, subject to the following conditions:
10878da15aSBen Skeggs  *
11878da15aSBen Skeggs  * The above copyright notice and this permission notice shall be included in
12878da15aSBen Skeggs  * all copies or substantial portions of the Software.
13878da15aSBen Skeggs  *
14878da15aSBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15878da15aSBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16878da15aSBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17878da15aSBen Skeggs  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18878da15aSBen Skeggs  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19878da15aSBen Skeggs  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20878da15aSBen Skeggs  * OTHER DEALINGS IN THE SOFTWARE.
21878da15aSBen Skeggs  *
22878da15aSBen Skeggs  * Authors: Ben Skeggs
23878da15aSBen Skeggs  */
2492fba5d3SBen Skeggs #include "priv.h"
25acbe9ecfSBen Skeggs #include "chan.h"
26acbe9ecfSBen Skeggs #include "hdmi.h"
27a1c93078SBen Skeggs #include "head.h"
2878f1ad6fSBen Skeggs #include "ior.h"
29168c0299SBen Skeggs 
30168c0299SBen Skeggs #include <nvif/class.h>
31878da15aSBen Skeggs 
32acbe9ecfSBen Skeggs void
gk104_sor_hdmi_infoframe_vsi(struct nvkm_ior * ior,int head,void * data,u32 size)33*f530bc60SBen Skeggs gk104_sor_hdmi_infoframe_vsi(struct nvkm_ior *ior, int head, void *data, u32 size)
34*f530bc60SBen Skeggs {
35*f530bc60SBen Skeggs 	struct nvkm_device *device = ior->disp->engine.subdev.device;
36*f530bc60SBen Skeggs 	struct packed_hdmi_infoframe vsi;
37*f530bc60SBen Skeggs 	const u32 hoff = head * 0x400;
38*f530bc60SBen Skeggs 
39*f530bc60SBen Skeggs 	pack_hdmi_infoframe(&vsi, data, size);
40*f530bc60SBen Skeggs 
41*f530bc60SBen Skeggs 	/* GENERIC(?) / Vendor InfoFrame? */
42*f530bc60SBen Skeggs 	nvkm_mask(device, 0x690100 + hoff, 0x00010001, 0x00000000);
43*f530bc60SBen Skeggs 	if (!size)
44*f530bc60SBen Skeggs 		return;
45*f530bc60SBen Skeggs 
46*f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690108 + hoff, vsi.header);
47*f530bc60SBen Skeggs 	nvkm_wr32(device, 0x69010c + hoff, vsi.subpack0_low);
48*f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690110 + hoff, vsi.subpack0_high);
49*f530bc60SBen Skeggs 	/* Is there a second (or further?) set of subpack registers here? */
50*f530bc60SBen Skeggs 	nvkm_mask(device, 0x690100 + hoff, 0x00000001, 0x00000001);
51*f530bc60SBen Skeggs }
52*f530bc60SBen Skeggs 
53*f530bc60SBen Skeggs void
gk104_sor_hdmi_infoframe_avi(struct nvkm_ior * ior,int head,void * data,u32 size)54*f530bc60SBen Skeggs gk104_sor_hdmi_infoframe_avi(struct nvkm_ior *ior, int head, void *data, u32 size)
55*f530bc60SBen Skeggs {
56*f530bc60SBen Skeggs 	struct nvkm_device *device = ior->disp->engine.subdev.device;
57*f530bc60SBen Skeggs 	struct packed_hdmi_infoframe avi;
58*f530bc60SBen Skeggs 	const u32 hoff = head * 0x400;
59*f530bc60SBen Skeggs 
60*f530bc60SBen Skeggs 	pack_hdmi_infoframe(&avi, data, size);
61*f530bc60SBen Skeggs 
62*f530bc60SBen Skeggs 	/* AVI InfoFrame */
63*f530bc60SBen Skeggs 	nvkm_mask(device, 0x690000 + hoff, 0x00000001, 0x00000000);
64*f530bc60SBen Skeggs 	if (!size)
65*f530bc60SBen Skeggs 		return;
66*f530bc60SBen Skeggs 
67*f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690008 + hoff, avi.header);
68*f530bc60SBen Skeggs 	nvkm_wr32(device, 0x69000c + hoff, avi.subpack0_low);
69*f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690010 + hoff, avi.subpack0_high);
70*f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690014 + hoff, avi.subpack1_low);
71*f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690018 + hoff, avi.subpack1_high);
72*f530bc60SBen Skeggs 
73*f530bc60SBen Skeggs 	nvkm_mask(device, 0x690000 + hoff, 0x00000001, 0x00000001);
74*f530bc60SBen Skeggs }
75*f530bc60SBen Skeggs 
76*f530bc60SBen Skeggs void
gk104_sor_hdmi_ctrl(struct nvkm_ior * ior,int head,bool enable,u8 max_ac_packet,u8 rekey)77*f530bc60SBen Skeggs gk104_sor_hdmi_ctrl(struct nvkm_ior *ior, int head, bool enable, u8 max_ac_packet, u8 rekey)
78acbe9ecfSBen Skeggs {
79acbe9ecfSBen Skeggs 	struct nvkm_device *device = ior->disp->engine.subdev.device;
80acbe9ecfSBen Skeggs 	const u32 ctrl = 0x40000000 * enable |
81acbe9ecfSBen Skeggs 			 max_ac_packet << 16 |
82acbe9ecfSBen Skeggs 			 rekey;
83acbe9ecfSBen Skeggs 	const u32 hoff = head * 0x800;
84acbe9ecfSBen Skeggs 	const u32 hdmi = head * 0x400;
85acbe9ecfSBen Skeggs 
86acbe9ecfSBen Skeggs 	if (!(ctrl & 0x40000000)) {
87acbe9ecfSBen Skeggs 		nvkm_mask(device, 0x616798 + hoff, 0x40000000, 0x00000000);
88acbe9ecfSBen Skeggs 		nvkm_mask(device, 0x690100 + hdmi, 0x00000001, 0x00000000);
89acbe9ecfSBen Skeggs 		nvkm_mask(device, 0x6900c0 + hdmi, 0x00000001, 0x00000000);
90acbe9ecfSBen Skeggs 		nvkm_mask(device, 0x690000 + hdmi, 0x00000001, 0x00000000);
91acbe9ecfSBen Skeggs 		return;
92acbe9ecfSBen Skeggs 	}
93acbe9ecfSBen Skeggs 
94acbe9ecfSBen Skeggs 	/* ??? InfoFrame? */
95acbe9ecfSBen Skeggs 	nvkm_mask(device, 0x6900c0 + hdmi, 0x00000001, 0x00000000);
96acbe9ecfSBen Skeggs 	nvkm_wr32(device, 0x6900cc + hdmi, 0x00000010);
97acbe9ecfSBen Skeggs 	nvkm_mask(device, 0x6900c0 + hdmi, 0x00000001, 0x00000001);
98acbe9ecfSBen Skeggs 
99acbe9ecfSBen Skeggs 	/* ??? */
100acbe9ecfSBen Skeggs 	nvkm_wr32(device, 0x690080 + hdmi, 0x82000000);
101acbe9ecfSBen Skeggs 
102acbe9ecfSBen Skeggs 	/* HDMI_CTRL */
103acbe9ecfSBen Skeggs 	nvkm_mask(device, 0x616798 + hoff, 0x401f007f, ctrl);
104acbe9ecfSBen Skeggs }
105acbe9ecfSBen Skeggs 
106*f530bc60SBen Skeggs const struct nvkm_ior_func_hdmi
107*f530bc60SBen Skeggs gk104_sor_hdmi = {
108*f530bc60SBen Skeggs 	.ctrl = gk104_sor_hdmi_ctrl,
109*f530bc60SBen Skeggs 	.infoframe_avi = gk104_sor_hdmi_infoframe_avi,
110*f530bc60SBen Skeggs 	.infoframe_vsi = gk104_sor_hdmi_infoframe_vsi,
111*f530bc60SBen Skeggs };
112*f530bc60SBen Skeggs 
113acbe9ecfSBen Skeggs static const struct nvkm_ior_func
114acbe9ecfSBen Skeggs gk104_sor = {
115acbe9ecfSBen Skeggs 	.state = gf119_sor_state,
116acbe9ecfSBen Skeggs 	.power = nv50_sor_power,
117acbe9ecfSBen Skeggs 	.clock = gf119_sor_clock,
118*f530bc60SBen Skeggs 	.hdmi = &gk104_sor_hdmi,
1199a4514fbSBen Skeggs 	.dp = &gf119_sor_dp,
1207bcf89eeSBen Skeggs 	.hda = &gf119_sor_hda,
121acbe9ecfSBen Skeggs };
122acbe9ecfSBen Skeggs 
123acbe9ecfSBen Skeggs int
gk104_sor_new(struct nvkm_disp * disp,int id)124acbe9ecfSBen Skeggs gk104_sor_new(struct nvkm_disp *disp, int id)
125acbe9ecfSBen Skeggs {
12679c453afSBen Skeggs 	return nvkm_ior_new_(&gk104_sor, disp, SOR, id, true);
127acbe9ecfSBen Skeggs }
128acbe9ecfSBen Skeggs 
129acbe9ecfSBen Skeggs static const struct nvkm_disp_mthd_list
130acbe9ecfSBen Skeggs gk104_disp_ovly_mthd_base = {
131acbe9ecfSBen Skeggs 	.mthd = 0x0000,
132acbe9ecfSBen Skeggs 	.data = {
133acbe9ecfSBen Skeggs 		{ 0x0080, 0x665080 },
134acbe9ecfSBen Skeggs 		{ 0x0084, 0x665084 },
135acbe9ecfSBen Skeggs 		{ 0x0088, 0x665088 },
136acbe9ecfSBen Skeggs 		{ 0x008c, 0x66508c },
137acbe9ecfSBen Skeggs 		{ 0x0090, 0x665090 },
138acbe9ecfSBen Skeggs 		{ 0x0094, 0x665094 },
139acbe9ecfSBen Skeggs 		{ 0x00a0, 0x6650a0 },
140acbe9ecfSBen Skeggs 		{ 0x00a4, 0x6650a4 },
141acbe9ecfSBen Skeggs 		{ 0x00b0, 0x6650b0 },
142acbe9ecfSBen Skeggs 		{ 0x00b4, 0x6650b4 },
143acbe9ecfSBen Skeggs 		{ 0x00b8, 0x6650b8 },
144acbe9ecfSBen Skeggs 		{ 0x00c0, 0x6650c0 },
145acbe9ecfSBen Skeggs 		{ 0x00c4, 0x6650c4 },
146acbe9ecfSBen Skeggs 		{ 0x00e0, 0x6650e0 },
147acbe9ecfSBen Skeggs 		{ 0x00e4, 0x6650e4 },
148acbe9ecfSBen Skeggs 		{ 0x00e8, 0x6650e8 },
149acbe9ecfSBen Skeggs 		{ 0x0100, 0x665100 },
150acbe9ecfSBen Skeggs 		{ 0x0104, 0x665104 },
151acbe9ecfSBen Skeggs 		{ 0x0108, 0x665108 },
152acbe9ecfSBen Skeggs 		{ 0x010c, 0x66510c },
153acbe9ecfSBen Skeggs 		{ 0x0110, 0x665110 },
154acbe9ecfSBen Skeggs 		{ 0x0118, 0x665118 },
155acbe9ecfSBen Skeggs 		{ 0x011c, 0x66511c },
156acbe9ecfSBen Skeggs 		{ 0x0120, 0x665120 },
157acbe9ecfSBen Skeggs 		{ 0x0124, 0x665124 },
158acbe9ecfSBen Skeggs 		{ 0x0130, 0x665130 },
159acbe9ecfSBen Skeggs 		{ 0x0134, 0x665134 },
160acbe9ecfSBen Skeggs 		{ 0x0138, 0x665138 },
161acbe9ecfSBen Skeggs 		{ 0x013c, 0x66513c },
162acbe9ecfSBen Skeggs 		{ 0x0140, 0x665140 },
163acbe9ecfSBen Skeggs 		{ 0x0144, 0x665144 },
164acbe9ecfSBen Skeggs 		{ 0x0148, 0x665148 },
165acbe9ecfSBen Skeggs 		{ 0x014c, 0x66514c },
166acbe9ecfSBen Skeggs 		{ 0x0150, 0x665150 },
167acbe9ecfSBen Skeggs 		{ 0x0154, 0x665154 },
168acbe9ecfSBen Skeggs 		{ 0x0158, 0x665158 },
169acbe9ecfSBen Skeggs 		{ 0x015c, 0x66515c },
170acbe9ecfSBen Skeggs 		{ 0x0160, 0x665160 },
171acbe9ecfSBen Skeggs 		{ 0x0164, 0x665164 },
172acbe9ecfSBen Skeggs 		{ 0x0168, 0x665168 },
173acbe9ecfSBen Skeggs 		{ 0x016c, 0x66516c },
174acbe9ecfSBen Skeggs 		{ 0x0400, 0x665400 },
175acbe9ecfSBen Skeggs 		{ 0x0404, 0x665404 },
176acbe9ecfSBen Skeggs 		{ 0x0408, 0x665408 },
177acbe9ecfSBen Skeggs 		{ 0x040c, 0x66540c },
178acbe9ecfSBen Skeggs 		{ 0x0410, 0x665410 },
179acbe9ecfSBen Skeggs 		{}
180acbe9ecfSBen Skeggs 	}
181acbe9ecfSBen Skeggs };
182acbe9ecfSBen Skeggs 
183acbe9ecfSBen Skeggs const struct nvkm_disp_chan_mthd
184acbe9ecfSBen Skeggs gk104_disp_ovly_mthd = {
185acbe9ecfSBen Skeggs 	.name = "Overlay",
186acbe9ecfSBen Skeggs 	.addr = 0x001000,
187acbe9ecfSBen Skeggs 	.prev = -0x020000,
188acbe9ecfSBen Skeggs 	.data = {
189acbe9ecfSBen Skeggs 		{ "Global", 1, &gk104_disp_ovly_mthd_base },
190acbe9ecfSBen Skeggs 		{}
191acbe9ecfSBen Skeggs 	}
192acbe9ecfSBen Skeggs };
193acbe9ecfSBen Skeggs 
194889fcbe9SBen Skeggs const struct nvkm_disp_chan_user
195889fcbe9SBen Skeggs gk104_disp_ovly = {
196889fcbe9SBen Skeggs 	.func = &gf119_disp_dmac_func,
197889fcbe9SBen Skeggs 	.ctrl = 5,
198889fcbe9SBen Skeggs 	.user = 5,
199889fcbe9SBen Skeggs 	.mthd = &gk104_disp_ovly_mthd,
200889fcbe9SBen Skeggs };
201acbe9ecfSBen Skeggs 
202acbe9ecfSBen Skeggs static const struct nvkm_disp_mthd_list
203acbe9ecfSBen Skeggs gk104_disp_core_mthd_head = {
204acbe9ecfSBen Skeggs 	.mthd = 0x0300,
205acbe9ecfSBen Skeggs 	.addr = 0x000300,
206acbe9ecfSBen Skeggs 	.data = {
207acbe9ecfSBen Skeggs 		{ 0x0400, 0x660400 },
208acbe9ecfSBen Skeggs 		{ 0x0404, 0x660404 },
209acbe9ecfSBen Skeggs 		{ 0x0408, 0x660408 },
210acbe9ecfSBen Skeggs 		{ 0x040c, 0x66040c },
211acbe9ecfSBen Skeggs 		{ 0x0410, 0x660410 },
212acbe9ecfSBen Skeggs 		{ 0x0414, 0x660414 },
213acbe9ecfSBen Skeggs 		{ 0x0418, 0x660418 },
214acbe9ecfSBen Skeggs 		{ 0x041c, 0x66041c },
215acbe9ecfSBen Skeggs 		{ 0x0420, 0x660420 },
216acbe9ecfSBen Skeggs 		{ 0x0424, 0x660424 },
217acbe9ecfSBen Skeggs 		{ 0x0428, 0x660428 },
218acbe9ecfSBen Skeggs 		{ 0x042c, 0x66042c },
219acbe9ecfSBen Skeggs 		{ 0x0430, 0x660430 },
220acbe9ecfSBen Skeggs 		{ 0x0434, 0x660434 },
221acbe9ecfSBen Skeggs 		{ 0x0438, 0x660438 },
222acbe9ecfSBen Skeggs 		{ 0x0440, 0x660440 },
223acbe9ecfSBen Skeggs 		{ 0x0444, 0x660444 },
224acbe9ecfSBen Skeggs 		{ 0x0448, 0x660448 },
225acbe9ecfSBen Skeggs 		{ 0x044c, 0x66044c },
226acbe9ecfSBen Skeggs 		{ 0x0450, 0x660450 },
227acbe9ecfSBen Skeggs 		{ 0x0454, 0x660454 },
228acbe9ecfSBen Skeggs 		{ 0x0458, 0x660458 },
229acbe9ecfSBen Skeggs 		{ 0x045c, 0x66045c },
230acbe9ecfSBen Skeggs 		{ 0x0460, 0x660460 },
231acbe9ecfSBen Skeggs 		{ 0x0468, 0x660468 },
232acbe9ecfSBen Skeggs 		{ 0x046c, 0x66046c },
233acbe9ecfSBen Skeggs 		{ 0x0470, 0x660470 },
234acbe9ecfSBen Skeggs 		{ 0x0474, 0x660474 },
235acbe9ecfSBen Skeggs 		{ 0x047c, 0x66047c },
236acbe9ecfSBen Skeggs 		{ 0x0480, 0x660480 },
237acbe9ecfSBen Skeggs 		{ 0x0484, 0x660484 },
238acbe9ecfSBen Skeggs 		{ 0x0488, 0x660488 },
239acbe9ecfSBen Skeggs 		{ 0x048c, 0x66048c },
240acbe9ecfSBen Skeggs 		{ 0x0490, 0x660490 },
241acbe9ecfSBen Skeggs 		{ 0x0494, 0x660494 },
242acbe9ecfSBen Skeggs 		{ 0x0498, 0x660498 },
243acbe9ecfSBen Skeggs 		{ 0x04a0, 0x6604a0 },
244acbe9ecfSBen Skeggs 		{ 0x04b0, 0x6604b0 },
245acbe9ecfSBen Skeggs 		{ 0x04b8, 0x6604b8 },
246acbe9ecfSBen Skeggs 		{ 0x04bc, 0x6604bc },
247acbe9ecfSBen Skeggs 		{ 0x04c0, 0x6604c0 },
248acbe9ecfSBen Skeggs 		{ 0x04c4, 0x6604c4 },
249acbe9ecfSBen Skeggs 		{ 0x04c8, 0x6604c8 },
250acbe9ecfSBen Skeggs 		{ 0x04d0, 0x6604d0 },
251acbe9ecfSBen Skeggs 		{ 0x04d4, 0x6604d4 },
252acbe9ecfSBen Skeggs 		{ 0x04e0, 0x6604e0 },
253acbe9ecfSBen Skeggs 		{ 0x04e4, 0x6604e4 },
254acbe9ecfSBen Skeggs 		{ 0x04e8, 0x6604e8 },
255acbe9ecfSBen Skeggs 		{ 0x04ec, 0x6604ec },
256acbe9ecfSBen Skeggs 		{ 0x04f0, 0x6604f0 },
257acbe9ecfSBen Skeggs 		{ 0x04f4, 0x6604f4 },
258acbe9ecfSBen Skeggs 		{ 0x04f8, 0x6604f8 },
259acbe9ecfSBen Skeggs 		{ 0x04fc, 0x6604fc },
260acbe9ecfSBen Skeggs 		{ 0x0500, 0x660500 },
261acbe9ecfSBen Skeggs 		{ 0x0504, 0x660504 },
262acbe9ecfSBen Skeggs 		{ 0x0508, 0x660508 },
263acbe9ecfSBen Skeggs 		{ 0x050c, 0x66050c },
264acbe9ecfSBen Skeggs 		{ 0x0510, 0x660510 },
265acbe9ecfSBen Skeggs 		{ 0x0514, 0x660514 },
266acbe9ecfSBen Skeggs 		{ 0x0518, 0x660518 },
267acbe9ecfSBen Skeggs 		{ 0x051c, 0x66051c },
268acbe9ecfSBen Skeggs 		{ 0x0520, 0x660520 },
269acbe9ecfSBen Skeggs 		{ 0x0524, 0x660524 },
270acbe9ecfSBen Skeggs 		{ 0x052c, 0x66052c },
271acbe9ecfSBen Skeggs 		{ 0x0530, 0x660530 },
272acbe9ecfSBen Skeggs 		{ 0x054c, 0x66054c },
273acbe9ecfSBen Skeggs 		{ 0x0550, 0x660550 },
274acbe9ecfSBen Skeggs 		{ 0x0554, 0x660554 },
275acbe9ecfSBen Skeggs 		{ 0x0558, 0x660558 },
276acbe9ecfSBen Skeggs 		{ 0x055c, 0x66055c },
277acbe9ecfSBen Skeggs 		{}
278acbe9ecfSBen Skeggs 	}
279acbe9ecfSBen Skeggs };
280acbe9ecfSBen Skeggs 
281acbe9ecfSBen Skeggs const struct nvkm_disp_chan_mthd
282acbe9ecfSBen Skeggs gk104_disp_core_mthd = {
283acbe9ecfSBen Skeggs 	.name = "Core",
284acbe9ecfSBen Skeggs 	.addr = 0x000000,
285acbe9ecfSBen Skeggs 	.prev = -0x020000,
286acbe9ecfSBen Skeggs 	.data = {
287acbe9ecfSBen Skeggs 		{ "Global", 1, &gf119_disp_core_mthd_base },
288acbe9ecfSBen Skeggs 		{    "DAC", 3, &gf119_disp_core_mthd_dac  },
289acbe9ecfSBen Skeggs 		{    "SOR", 8, &gf119_disp_core_mthd_sor  },
290acbe9ecfSBen Skeggs 		{   "PIOR", 4, &gf119_disp_core_mthd_pior },
291acbe9ecfSBen Skeggs 		{   "HEAD", 4, &gk104_disp_core_mthd_head },
292acbe9ecfSBen Skeggs 		{}
293acbe9ecfSBen Skeggs 	}
294acbe9ecfSBen Skeggs };
295acbe9ecfSBen Skeggs 
296889fcbe9SBen Skeggs const struct nvkm_disp_chan_user
297889fcbe9SBen Skeggs gk104_disp_core = {
298889fcbe9SBen Skeggs 	.func = &gf119_disp_core_func,
299889fcbe9SBen Skeggs 	.ctrl = 0,
300889fcbe9SBen Skeggs 	.user = 0,
301889fcbe9SBen Skeggs 	.mthd = &gk104_disp_core_mthd,
302889fcbe9SBen Skeggs };
303acbe9ecfSBen Skeggs 
3040407b33fSBen Skeggs static const struct nvkm_disp_func
3050ce41e3cSBen Skeggs gk104_disp = {
306acbe9ecfSBen Skeggs 	.oneinit = nv50_disp_oneinit,
30792fba5d3SBen Skeggs 	.init = gf119_disp_init,
30892fba5d3SBen Skeggs 	.fini = gf119_disp_fini,
30992fba5d3SBen Skeggs 	.intr = gf119_disp_intr,
310fd47877fSBen Skeggs 	.intr_error = gf119_disp_intr_error,
311af85389cSBen Skeggs 	.super = gf119_disp_super,
31292fba5d3SBen Skeggs 	.uevent = &gf119_disp_chan_uevent,
313f7b2ece3SBen Skeggs 	.head = { .cnt = gf119_head_cnt, .new = gf119_head_new },
314bf5d1a6bSBen Skeggs 	.dac = { .cnt = gf119_dac_cnt, .new = gf119_dac_new },
3159fe4e177SBen Skeggs 	.sor = { .cnt = gf119_sor_cnt, .new = gk104_sor_new },
316168c0299SBen Skeggs 	.root = { 0,0,GK104_DISP },
317168c0299SBen Skeggs 	.user = {
318889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_CURSOR             }, nvkm_disp_chan_new, &gf119_disp_curs },
319889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_OVERLAY            }, nvkm_disp_chan_new, &gf119_disp_oimm },
320889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_BASE_CHANNEL_DMA   }, nvkm_disp_chan_new, &gf119_disp_base },
321889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_CORE_CHANNEL_DMA   }, nvkm_disp_core_new, &gk104_disp_core },
322889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, nvkm_disp_chan_new, &gk104_disp_ovly },
323168c0299SBen Skeggs 		{}
324168c0299SBen Skeggs 	},
3250ce41e3cSBen Skeggs };
3260ce41e3cSBen Skeggs 
32770aa8670SBen Skeggs int
gk104_disp_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_disp ** pdisp)328a7f000ecSBen Skeggs gk104_disp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
329a7f000ecSBen Skeggs 	       struct nvkm_disp **pdisp)
330878da15aSBen Skeggs {
3311c6aab75SBen Skeggs 	return nvkm_disp_new_(&gk104_disp, device, type, inst, pdisp);
332878da15aSBen Skeggs }
333