1*677dec6eSriastradh /*	$NetBSD: nouveau_nvkm_engine_disp_gt215.c,v 1.3 2021/12/18 23:45:35 riastradh Exp $	*/
2d350ecf5Sriastradh 
3d350ecf5Sriastradh /*
4d350ecf5Sriastradh  * Copyright 2012 Red Hat Inc.
5d350ecf5Sriastradh  *
6d350ecf5Sriastradh  * Permission is hereby granted, free of charge, to any person obtaining a
7d350ecf5Sriastradh  * copy of this software and associated documentation files (the "Software"),
8d350ecf5Sriastradh  * to deal in the Software without restriction, including without limitation
9d350ecf5Sriastradh  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10d350ecf5Sriastradh  * and/or sell copies of the Software, and to permit persons to whom the
11d350ecf5Sriastradh  * Software is furnished to do so, subject to the following conditions:
12d350ecf5Sriastradh  *
13d350ecf5Sriastradh  * The above copyright notice and this permission notice shall be included in
14d350ecf5Sriastradh  * all copies or substantial portions of the Software.
15d350ecf5Sriastradh  *
16d350ecf5Sriastradh  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17d350ecf5Sriastradh  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18d350ecf5Sriastradh  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19d350ecf5Sriastradh  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20d350ecf5Sriastradh  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21d350ecf5Sriastradh  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22d350ecf5Sriastradh  * OTHER DEALINGS IN THE SOFTWARE.
23d350ecf5Sriastradh  *
24d350ecf5Sriastradh  * Authors: Ben Skeggs
25d350ecf5Sriastradh  */
26d350ecf5Sriastradh #include <sys/cdefs.h>
27*677dec6eSriastradh __KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_engine_disp_gt215.c,v 1.3 2021/12/18 23:45:35 riastradh Exp $");
28d350ecf5Sriastradh 
29d350ecf5Sriastradh #include "nv50.h"
30*677dec6eSriastradh #include "head.h"
31*677dec6eSriastradh #include "ior.h"
32d350ecf5Sriastradh #include "rootnv50.h"
33d350ecf5Sriastradh 
34d350ecf5Sriastradh static const struct nv50_disp_func
35d350ecf5Sriastradh gt215_disp = {
36*677dec6eSriastradh 	.init = nv50_disp_init,
37*677dec6eSriastradh 	.fini = nv50_disp_fini,
38d350ecf5Sriastradh 	.intr = nv50_disp_intr,
39d350ecf5Sriastradh 	.uevent = &nv50_disp_chan_uevent,
40*677dec6eSriastradh 	.super = nv50_disp_super,
41d350ecf5Sriastradh 	.root = &gt215_disp_root_oclass,
42*677dec6eSriastradh 	.head = { .cnt = nv50_head_cnt, .new = nv50_head_new },
43*677dec6eSriastradh 	.dac = { .cnt = nv50_dac_cnt, .new = nv50_dac_new },
44*677dec6eSriastradh 	.sor = { .cnt = g94_sor_cnt, .new = gt215_sor_new },
45*677dec6eSriastradh 	.pior = { .cnt = nv50_pior_cnt, .new = nv50_pior_new },
46d350ecf5Sriastradh };
47d350ecf5Sriastradh 
48d350ecf5Sriastradh int
gt215_disp_new(struct nvkm_device * device,int index,struct nvkm_disp ** pdisp)49d350ecf5Sriastradh gt215_disp_new(struct nvkm_device *device, int index, struct nvkm_disp **pdisp)
50d350ecf5Sriastradh {
51*677dec6eSriastradh 	return nv50_disp_new_(&gt215_disp, device, index, pdisp);
52d350ecf5Sriastradh }
53