xref: /linux/drivers/gpu/drm/nouveau/nvkm/engine/disp/gk104.c (revision 03c11eb3b16dc0058589751dfd91f254be2be613)
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)33f530bc60SBen Skeggs gk104_sor_hdmi_infoframe_vsi(struct nvkm_ior *ior, int head, void *data, u32 size)
34f530bc60SBen Skeggs {
35f530bc60SBen Skeggs 	struct nvkm_device *device = ior->disp->engine.subdev.device;
36f530bc60SBen Skeggs 	struct packed_hdmi_infoframe vsi;
37f530bc60SBen Skeggs 	const u32 hoff = head * 0x400;
38f530bc60SBen Skeggs 
39f530bc60SBen Skeggs 	pack_hdmi_infoframe(&vsi, data, size);
40f530bc60SBen Skeggs 
41f530bc60SBen Skeggs 	/* GENERIC(?) / Vendor InfoFrame? */
42f530bc60SBen Skeggs 	nvkm_mask(device, 0x690100 + hoff, 0x00010001, 0x00000000);
43f530bc60SBen Skeggs 	if (!size)
44f530bc60SBen Skeggs 		return;
45f530bc60SBen Skeggs 
46f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690108 + hoff, vsi.header);
47f530bc60SBen Skeggs 	nvkm_wr32(device, 0x69010c + hoff, vsi.subpack0_low);
48f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690110 + hoff, vsi.subpack0_high);
49f530bc60SBen Skeggs 	/* Is there a second (or further?) set of subpack registers here? */
50f530bc60SBen Skeggs 	nvkm_mask(device, 0x690100 + hoff, 0x00000001, 0x00000001);
51f530bc60SBen Skeggs }
52f530bc60SBen Skeggs 
53f530bc60SBen Skeggs void
gk104_sor_hdmi_infoframe_avi(struct nvkm_ior * ior,int head,void * data,u32 size)54f530bc60SBen Skeggs gk104_sor_hdmi_infoframe_avi(struct nvkm_ior *ior, int head, void *data, u32 size)
55f530bc60SBen Skeggs {
56f530bc60SBen Skeggs 	struct nvkm_device *device = ior->disp->engine.subdev.device;
57f530bc60SBen Skeggs 	struct packed_hdmi_infoframe avi;
58f530bc60SBen Skeggs 	const u32 hoff = head * 0x400;
59f530bc60SBen Skeggs 
60f530bc60SBen Skeggs 	pack_hdmi_infoframe(&avi, data, size);
61f530bc60SBen Skeggs 
62f530bc60SBen Skeggs 	/* AVI InfoFrame */
63f530bc60SBen Skeggs 	nvkm_mask(device, 0x690000 + hoff, 0x00000001, 0x00000000);
64f530bc60SBen Skeggs 	if (!size)
65f530bc60SBen Skeggs 		return;
66f530bc60SBen Skeggs 
67f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690008 + hoff, avi.header);
68f530bc60SBen Skeggs 	nvkm_wr32(device, 0x69000c + hoff, avi.subpack0_low);
69f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690010 + hoff, avi.subpack0_high);
70f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690014 + hoff, avi.subpack1_low);
71f530bc60SBen Skeggs 	nvkm_wr32(device, 0x690018 + hoff, avi.subpack1_high);
72f530bc60SBen Skeggs 
73f530bc60SBen Skeggs 	nvkm_mask(device, 0x690000 + hoff, 0x00000001, 0x00000001);
74f530bc60SBen Skeggs }
75f530bc60SBen Skeggs 
76f530bc60SBen Skeggs void
gk104_sor_hdmi_ctrl(struct nvkm_ior * ior,int head,bool enable,u8 max_ac_packet,u8 rekey)77f530bc60SBen 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 
106f530bc60SBen Skeggs const struct nvkm_ior_func_hdmi
107f530bc60SBen Skeggs gk104_sor_hdmi = {
108f530bc60SBen Skeggs 	.ctrl = gk104_sor_hdmi_ctrl,
109f530bc60SBen Skeggs 	.infoframe_avi = gk104_sor_hdmi_infoframe_avi,
110f530bc60SBen Skeggs 	.infoframe_vsi = gk104_sor_hdmi_infoframe_vsi,
111f530bc60SBen Skeggs };
112f530bc60SBen 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*2274ce7eSBen Skeggs 	.bl = &gt215_sor_bl,
119f530bc60SBen Skeggs 	.hdmi = &gk104_sor_hdmi,
1209a4514fbSBen Skeggs 	.dp = &gf119_sor_dp,
1217bcf89eeSBen Skeggs 	.hda = &gf119_sor_hda,
122acbe9ecfSBen Skeggs };
123acbe9ecfSBen Skeggs 
124acbe9ecfSBen Skeggs int
gk104_sor_new(struct nvkm_disp * disp,int id)125acbe9ecfSBen Skeggs gk104_sor_new(struct nvkm_disp *disp, int id)
126acbe9ecfSBen Skeggs {
12779c453afSBen Skeggs 	return nvkm_ior_new_(&gk104_sor, disp, SOR, id, true);
128acbe9ecfSBen Skeggs }
129acbe9ecfSBen Skeggs 
130acbe9ecfSBen Skeggs static const struct nvkm_disp_mthd_list
131acbe9ecfSBen Skeggs gk104_disp_ovly_mthd_base = {
132acbe9ecfSBen Skeggs 	.mthd = 0x0000,
133acbe9ecfSBen Skeggs 	.data = {
134acbe9ecfSBen Skeggs 		{ 0x0080, 0x665080 },
135acbe9ecfSBen Skeggs 		{ 0x0084, 0x665084 },
136acbe9ecfSBen Skeggs 		{ 0x0088, 0x665088 },
137acbe9ecfSBen Skeggs 		{ 0x008c, 0x66508c },
138acbe9ecfSBen Skeggs 		{ 0x0090, 0x665090 },
139acbe9ecfSBen Skeggs 		{ 0x0094, 0x665094 },
140acbe9ecfSBen Skeggs 		{ 0x00a0, 0x6650a0 },
141acbe9ecfSBen Skeggs 		{ 0x00a4, 0x6650a4 },
142acbe9ecfSBen Skeggs 		{ 0x00b0, 0x6650b0 },
143acbe9ecfSBen Skeggs 		{ 0x00b4, 0x6650b4 },
144acbe9ecfSBen Skeggs 		{ 0x00b8, 0x6650b8 },
145acbe9ecfSBen Skeggs 		{ 0x00c0, 0x6650c0 },
146acbe9ecfSBen Skeggs 		{ 0x00c4, 0x6650c4 },
147acbe9ecfSBen Skeggs 		{ 0x00e0, 0x6650e0 },
148acbe9ecfSBen Skeggs 		{ 0x00e4, 0x6650e4 },
149acbe9ecfSBen Skeggs 		{ 0x00e8, 0x6650e8 },
150acbe9ecfSBen Skeggs 		{ 0x0100, 0x665100 },
151acbe9ecfSBen Skeggs 		{ 0x0104, 0x665104 },
152acbe9ecfSBen Skeggs 		{ 0x0108, 0x665108 },
153acbe9ecfSBen Skeggs 		{ 0x010c, 0x66510c },
154acbe9ecfSBen Skeggs 		{ 0x0110, 0x665110 },
155acbe9ecfSBen Skeggs 		{ 0x0118, 0x665118 },
156acbe9ecfSBen Skeggs 		{ 0x011c, 0x66511c },
157acbe9ecfSBen Skeggs 		{ 0x0120, 0x665120 },
158acbe9ecfSBen Skeggs 		{ 0x0124, 0x665124 },
159acbe9ecfSBen Skeggs 		{ 0x0130, 0x665130 },
160acbe9ecfSBen Skeggs 		{ 0x0134, 0x665134 },
161acbe9ecfSBen Skeggs 		{ 0x0138, 0x665138 },
162acbe9ecfSBen Skeggs 		{ 0x013c, 0x66513c },
163acbe9ecfSBen Skeggs 		{ 0x0140, 0x665140 },
164acbe9ecfSBen Skeggs 		{ 0x0144, 0x665144 },
165acbe9ecfSBen Skeggs 		{ 0x0148, 0x665148 },
166acbe9ecfSBen Skeggs 		{ 0x014c, 0x66514c },
167acbe9ecfSBen Skeggs 		{ 0x0150, 0x665150 },
168acbe9ecfSBen Skeggs 		{ 0x0154, 0x665154 },
169acbe9ecfSBen Skeggs 		{ 0x0158, 0x665158 },
170acbe9ecfSBen Skeggs 		{ 0x015c, 0x66515c },
171acbe9ecfSBen Skeggs 		{ 0x0160, 0x665160 },
172acbe9ecfSBen Skeggs 		{ 0x0164, 0x665164 },
173acbe9ecfSBen Skeggs 		{ 0x0168, 0x665168 },
174acbe9ecfSBen Skeggs 		{ 0x016c, 0x66516c },
175acbe9ecfSBen Skeggs 		{ 0x0400, 0x665400 },
176acbe9ecfSBen Skeggs 		{ 0x0404, 0x665404 },
177acbe9ecfSBen Skeggs 		{ 0x0408, 0x665408 },
178acbe9ecfSBen Skeggs 		{ 0x040c, 0x66540c },
179acbe9ecfSBen Skeggs 		{ 0x0410, 0x665410 },
180acbe9ecfSBen Skeggs 		{}
181acbe9ecfSBen Skeggs 	}
182acbe9ecfSBen Skeggs };
183acbe9ecfSBen Skeggs 
184acbe9ecfSBen Skeggs const struct nvkm_disp_chan_mthd
185acbe9ecfSBen Skeggs gk104_disp_ovly_mthd = {
186acbe9ecfSBen Skeggs 	.name = "Overlay",
187acbe9ecfSBen Skeggs 	.addr = 0x001000,
188acbe9ecfSBen Skeggs 	.prev = -0x020000,
189acbe9ecfSBen Skeggs 	.data = {
190acbe9ecfSBen Skeggs 		{ "Global", 1, &gk104_disp_ovly_mthd_base },
191acbe9ecfSBen Skeggs 		{}
192acbe9ecfSBen Skeggs 	}
193acbe9ecfSBen Skeggs };
194acbe9ecfSBen Skeggs 
195889fcbe9SBen Skeggs const struct nvkm_disp_chan_user
196889fcbe9SBen Skeggs gk104_disp_ovly = {
197889fcbe9SBen Skeggs 	.func = &gf119_disp_dmac_func,
198889fcbe9SBen Skeggs 	.ctrl = 5,
199889fcbe9SBen Skeggs 	.user = 5,
200889fcbe9SBen Skeggs 	.mthd = &gk104_disp_ovly_mthd,
201889fcbe9SBen Skeggs };
202acbe9ecfSBen Skeggs 
203acbe9ecfSBen Skeggs static const struct nvkm_disp_mthd_list
204acbe9ecfSBen Skeggs gk104_disp_core_mthd_head = {
205acbe9ecfSBen Skeggs 	.mthd = 0x0300,
206acbe9ecfSBen Skeggs 	.addr = 0x000300,
207acbe9ecfSBen Skeggs 	.data = {
208acbe9ecfSBen Skeggs 		{ 0x0400, 0x660400 },
209acbe9ecfSBen Skeggs 		{ 0x0404, 0x660404 },
210acbe9ecfSBen Skeggs 		{ 0x0408, 0x660408 },
211acbe9ecfSBen Skeggs 		{ 0x040c, 0x66040c },
212acbe9ecfSBen Skeggs 		{ 0x0410, 0x660410 },
213acbe9ecfSBen Skeggs 		{ 0x0414, 0x660414 },
214acbe9ecfSBen Skeggs 		{ 0x0418, 0x660418 },
215acbe9ecfSBen Skeggs 		{ 0x041c, 0x66041c },
216acbe9ecfSBen Skeggs 		{ 0x0420, 0x660420 },
217acbe9ecfSBen Skeggs 		{ 0x0424, 0x660424 },
218acbe9ecfSBen Skeggs 		{ 0x0428, 0x660428 },
219acbe9ecfSBen Skeggs 		{ 0x042c, 0x66042c },
220acbe9ecfSBen Skeggs 		{ 0x0430, 0x660430 },
221acbe9ecfSBen Skeggs 		{ 0x0434, 0x660434 },
222acbe9ecfSBen Skeggs 		{ 0x0438, 0x660438 },
223acbe9ecfSBen Skeggs 		{ 0x0440, 0x660440 },
224acbe9ecfSBen Skeggs 		{ 0x0444, 0x660444 },
225acbe9ecfSBen Skeggs 		{ 0x0448, 0x660448 },
226acbe9ecfSBen Skeggs 		{ 0x044c, 0x66044c },
227acbe9ecfSBen Skeggs 		{ 0x0450, 0x660450 },
228acbe9ecfSBen Skeggs 		{ 0x0454, 0x660454 },
229acbe9ecfSBen Skeggs 		{ 0x0458, 0x660458 },
230acbe9ecfSBen Skeggs 		{ 0x045c, 0x66045c },
231acbe9ecfSBen Skeggs 		{ 0x0460, 0x660460 },
232acbe9ecfSBen Skeggs 		{ 0x0468, 0x660468 },
233acbe9ecfSBen Skeggs 		{ 0x046c, 0x66046c },
234acbe9ecfSBen Skeggs 		{ 0x0470, 0x660470 },
235acbe9ecfSBen Skeggs 		{ 0x0474, 0x660474 },
236acbe9ecfSBen Skeggs 		{ 0x047c, 0x66047c },
237acbe9ecfSBen Skeggs 		{ 0x0480, 0x660480 },
238acbe9ecfSBen Skeggs 		{ 0x0484, 0x660484 },
239acbe9ecfSBen Skeggs 		{ 0x0488, 0x660488 },
240acbe9ecfSBen Skeggs 		{ 0x048c, 0x66048c },
241acbe9ecfSBen Skeggs 		{ 0x0490, 0x660490 },
242acbe9ecfSBen Skeggs 		{ 0x0494, 0x660494 },
243acbe9ecfSBen Skeggs 		{ 0x0498, 0x660498 },
244acbe9ecfSBen Skeggs 		{ 0x04a0, 0x6604a0 },
245acbe9ecfSBen Skeggs 		{ 0x04b0, 0x6604b0 },
246acbe9ecfSBen Skeggs 		{ 0x04b8, 0x6604b8 },
247acbe9ecfSBen Skeggs 		{ 0x04bc, 0x6604bc },
248acbe9ecfSBen Skeggs 		{ 0x04c0, 0x6604c0 },
249acbe9ecfSBen Skeggs 		{ 0x04c4, 0x6604c4 },
250acbe9ecfSBen Skeggs 		{ 0x04c8, 0x6604c8 },
251acbe9ecfSBen Skeggs 		{ 0x04d0, 0x6604d0 },
252acbe9ecfSBen Skeggs 		{ 0x04d4, 0x6604d4 },
253acbe9ecfSBen Skeggs 		{ 0x04e0, 0x6604e0 },
254acbe9ecfSBen Skeggs 		{ 0x04e4, 0x6604e4 },
255acbe9ecfSBen Skeggs 		{ 0x04e8, 0x6604e8 },
256acbe9ecfSBen Skeggs 		{ 0x04ec, 0x6604ec },
257acbe9ecfSBen Skeggs 		{ 0x04f0, 0x6604f0 },
258acbe9ecfSBen Skeggs 		{ 0x04f4, 0x6604f4 },
259acbe9ecfSBen Skeggs 		{ 0x04f8, 0x6604f8 },
260acbe9ecfSBen Skeggs 		{ 0x04fc, 0x6604fc },
261acbe9ecfSBen Skeggs 		{ 0x0500, 0x660500 },
262acbe9ecfSBen Skeggs 		{ 0x0504, 0x660504 },
263acbe9ecfSBen Skeggs 		{ 0x0508, 0x660508 },
264acbe9ecfSBen Skeggs 		{ 0x050c, 0x66050c },
265acbe9ecfSBen Skeggs 		{ 0x0510, 0x660510 },
266acbe9ecfSBen Skeggs 		{ 0x0514, 0x660514 },
267acbe9ecfSBen Skeggs 		{ 0x0518, 0x660518 },
268acbe9ecfSBen Skeggs 		{ 0x051c, 0x66051c },
269acbe9ecfSBen Skeggs 		{ 0x0520, 0x660520 },
270acbe9ecfSBen Skeggs 		{ 0x0524, 0x660524 },
271acbe9ecfSBen Skeggs 		{ 0x052c, 0x66052c },
272acbe9ecfSBen Skeggs 		{ 0x0530, 0x660530 },
273acbe9ecfSBen Skeggs 		{ 0x054c, 0x66054c },
274acbe9ecfSBen Skeggs 		{ 0x0550, 0x660550 },
275acbe9ecfSBen Skeggs 		{ 0x0554, 0x660554 },
276acbe9ecfSBen Skeggs 		{ 0x0558, 0x660558 },
277acbe9ecfSBen Skeggs 		{ 0x055c, 0x66055c },
278acbe9ecfSBen Skeggs 		{}
279acbe9ecfSBen Skeggs 	}
280acbe9ecfSBen Skeggs };
281acbe9ecfSBen Skeggs 
282acbe9ecfSBen Skeggs const struct nvkm_disp_chan_mthd
283acbe9ecfSBen Skeggs gk104_disp_core_mthd = {
284acbe9ecfSBen Skeggs 	.name = "Core",
285acbe9ecfSBen Skeggs 	.addr = 0x000000,
286acbe9ecfSBen Skeggs 	.prev = -0x020000,
287acbe9ecfSBen Skeggs 	.data = {
288acbe9ecfSBen Skeggs 		{ "Global", 1, &gf119_disp_core_mthd_base },
289acbe9ecfSBen Skeggs 		{    "DAC", 3, &gf119_disp_core_mthd_dac  },
290acbe9ecfSBen Skeggs 		{    "SOR", 8, &gf119_disp_core_mthd_sor  },
291acbe9ecfSBen Skeggs 		{   "PIOR", 4, &gf119_disp_core_mthd_pior },
292acbe9ecfSBen Skeggs 		{   "HEAD", 4, &gk104_disp_core_mthd_head },
293acbe9ecfSBen Skeggs 		{}
294acbe9ecfSBen Skeggs 	}
295acbe9ecfSBen Skeggs };
296acbe9ecfSBen Skeggs 
297889fcbe9SBen Skeggs const struct nvkm_disp_chan_user
298889fcbe9SBen Skeggs gk104_disp_core = {
299889fcbe9SBen Skeggs 	.func = &gf119_disp_core_func,
300889fcbe9SBen Skeggs 	.ctrl = 0,
301889fcbe9SBen Skeggs 	.user = 0,
302889fcbe9SBen Skeggs 	.mthd = &gk104_disp_core_mthd,
303889fcbe9SBen Skeggs };
304acbe9ecfSBen Skeggs 
3050407b33fSBen Skeggs static const struct nvkm_disp_func
3060ce41e3cSBen Skeggs gk104_disp = {
307acbe9ecfSBen Skeggs 	.oneinit = nv50_disp_oneinit,
30892fba5d3SBen Skeggs 	.init = gf119_disp_init,
30992fba5d3SBen Skeggs 	.fini = gf119_disp_fini,
31092fba5d3SBen Skeggs 	.intr = gf119_disp_intr,
311fd47877fSBen Skeggs 	.intr_error = gf119_disp_intr_error,
312af85389cSBen Skeggs 	.super = gf119_disp_super,
31392fba5d3SBen Skeggs 	.uevent = &gf119_disp_chan_uevent,
314f7b2ece3SBen Skeggs 	.head = { .cnt = gf119_head_cnt, .new = gf119_head_new },
315bf5d1a6bSBen Skeggs 	.dac = { .cnt = gf119_dac_cnt, .new = gf119_dac_new },
3169fe4e177SBen Skeggs 	.sor = { .cnt = gf119_sor_cnt, .new = gk104_sor_new },
317168c0299SBen Skeggs 	.root = { 0,0,GK104_DISP },
318168c0299SBen Skeggs 	.user = {
319889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_CURSOR             }, nvkm_disp_chan_new, &gf119_disp_curs },
320889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_OVERLAY            }, nvkm_disp_chan_new, &gf119_disp_oimm },
321889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_BASE_CHANNEL_DMA   }, nvkm_disp_chan_new, &gf119_disp_base },
322889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_CORE_CHANNEL_DMA   }, nvkm_disp_core_new, &gk104_disp_core },
323889fcbe9SBen Skeggs 		{{0,0,GK104_DISP_OVERLAY_CONTROL_DMA}, nvkm_disp_chan_new, &gk104_disp_ovly },
324168c0299SBen Skeggs 		{}
325168c0299SBen Skeggs 	},
3260ce41e3cSBen Skeggs };
3270ce41e3cSBen Skeggs 
32870aa8670SBen Skeggs int
gk104_disp_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_disp ** pdisp)329a7f000ecSBen Skeggs gk104_disp_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
330a7f000ecSBen Skeggs 	       struct nvkm_disp **pdisp)
331878da15aSBen Skeggs {
3321c6aab75SBen Skeggs 	return nvkm_disp_new_(&gk104_disp, device, type, inst, pdisp);
333878da15aSBen Skeggs }
334