149b2dfc0SBen Skeggs /*
249b2dfc0SBen Skeggs  * Copyright 2021 Red Hat Inc.
349b2dfc0SBen Skeggs  *
449b2dfc0SBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
549b2dfc0SBen Skeggs  * copy of this software and associated documentation files (the "Software"),
649b2dfc0SBen Skeggs  * to deal in the Software without restriction, including without limitation
749b2dfc0SBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
849b2dfc0SBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
949b2dfc0SBen Skeggs  * Software is furnished to do so, subject to the following conditions:
1049b2dfc0SBen Skeggs  *
1149b2dfc0SBen Skeggs  * The above copyright notice and this permission notice shall be included in
1249b2dfc0SBen Skeggs  * all copies or substantial portions of the Software.
1349b2dfc0SBen Skeggs  *
1449b2dfc0SBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1549b2dfc0SBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1649b2dfc0SBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1749b2dfc0SBen Skeggs  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
1849b2dfc0SBen Skeggs  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1949b2dfc0SBen Skeggs  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2049b2dfc0SBen Skeggs  * OTHER DEALINGS IN THE SOFTWARE.
2149b2dfc0SBen Skeggs  */
22*7f4f35eaSBen Skeggs #include "priv.h"
2349b2dfc0SBen Skeggs 
2449b2dfc0SBen Skeggs #include <nvif/class.h>
2549b2dfc0SBen Skeggs 
26*7f4f35eaSBen Skeggs static const struct nvkm_fifo_func
2749b2dfc0SBen Skeggs ga102_fifo = {
28*7f4f35eaSBen Skeggs 	.runl_ctor = ga100_fifo_runl_ctor,
29*7f4f35eaSBen Skeggs 	.mmu_fault = &tu102_fifo_mmu_fault,
30*7f4f35eaSBen Skeggs 	.nonstall_ctor = ga100_fifo_nonstall_ctor,
31*7f4f35eaSBen Skeggs 	.nonstall = &ga100_fifo_nonstall,
32*7f4f35eaSBen Skeggs 	.runl = &ga100_runl,
33*7f4f35eaSBen Skeggs 	.runq = &ga100_runq,
34*7f4f35eaSBen Skeggs 	.engn = &ga100_engn,
35*7f4f35eaSBen Skeggs 	.engn_ce = &ga100_engn_ce,
36*7f4f35eaSBen Skeggs 	.cgrp = {{ 0, 0, KEPLER_CHANNEL_GROUP_A  }, &ga100_cgrp, .force = true },
37*7f4f35eaSBen Skeggs 	.chan = {{ 0, 0, AMPERE_CHANNEL_GPFIFO_B }, &ga100_chan },
3849b2dfc0SBen Skeggs };
3949b2dfc0SBen Skeggs 
4049b2dfc0SBen Skeggs int
ga102_fifo_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_fifo ** pfifo)4149b2dfc0SBen Skeggs ga102_fifo_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
4249b2dfc0SBen Skeggs 	       struct nvkm_fifo **pfifo)
4349b2dfc0SBen Skeggs {
44*7f4f35eaSBen Skeggs 	return nvkm_fifo_new_(&ga102_fifo, device, type, inst, pfifo);
4549b2dfc0SBen Skeggs }
46