1c39f472eSBen Skeggs /*
2c39f472eSBen Skeggs  * Copyright (c) 2014, NVIDIA CORPORATION. All rights reserved.
3c39f472eSBen Skeggs  *
4c39f472eSBen Skeggs  * Permission is hereby granted, free of charge, to any person obtaining a
5c39f472eSBen Skeggs  * copy of this software and associated documentation files (the "Software"),
6c39f472eSBen Skeggs  * to deal in the Software without restriction, including without limitation
7c39f472eSBen Skeggs  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8c39f472eSBen Skeggs  * and/or sell copies of the Software, and to permit persons to whom the
9c39f472eSBen Skeggs  * Software is furnished to do so, subject to the following conditions:
10c39f472eSBen Skeggs  *
11c39f472eSBen Skeggs  * The above copyright notice and this permission notice shall be included in
12c39f472eSBen Skeggs  * all copies or substantial portions of the Software.
13c39f472eSBen Skeggs  *
14c39f472eSBen Skeggs  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15c39f472eSBen Skeggs  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16c39f472eSBen Skeggs  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
17c39f472eSBen Skeggs  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18c39f472eSBen Skeggs  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19c39f472eSBen Skeggs  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20c39f472eSBen Skeggs  * DEALINGS IN THE SOFTWARE.
21c39f472eSBen Skeggs  */
22*06db7fdeSBen Skeggs #include "priv.h"
23c39f472eSBen Skeggs 
24f9360c3aSBen Skeggs #include <nvif/class.h>
25f9360c3aSBen Skeggs 
269be9c606SBen Skeggs static const struct nvkm_fifo_func
2713de7f46SBen Skeggs gk20a_fifo = {
288c18138cSBen Skeggs 	.chid_nr = nv50_fifo_chid_nr,
29800ac1f8SBen Skeggs 	.chid_ctor = gk110_fifo_chid_ctor,
301c488ba9SBen Skeggs 	.runq_nr = gf100_fifo_runq_nr,
31d94470e9SBen Skeggs 	.runl_ctor = gk104_fifo_runl_ctor,
329be9c606SBen Skeggs 	.init = gk104_fifo_init,
33965c41d9SBen Skeggs 	.init_pbdmas = gk104_fifo_init_pbdmas,
349be9c606SBen Skeggs 	.intr = gk104_fifo_intr,
359be9c606SBen Skeggs 	.intr_mmu_fault_unit = gf100_fifo_intr_mmu_fault_unit,
364d60100aSBen Skeggs 	.intr_ctxsw_timeout = gf100_fifo_intr_ctxsw_timeout,
379be9c606SBen Skeggs 	.mmu_fault = &gk104_fifo_mmu_fault,
38d67f3b96SBen Skeggs 	.nonstall = &gf100_fifo_nonstall,
39d94470e9SBen Skeggs 	.runl = &gk110_runl,
401c488ba9SBen Skeggs 	.runq = &gk208_runq,
41d94470e9SBen Skeggs 	.engn = &gk104_engn,
42d94470e9SBen Skeggs 	.engn_ce = &gk104_engn_ce,
43f5e45689SBen Skeggs 	.cgrp = {{                               }, &gk110_cgrp },
44*06db7fdeSBen Skeggs 	.chan = {{ 0, 0, KEPLER_CHANNEL_GPFIFO_A }, &gk110_chan },
4513de7f46SBen Skeggs };
4613de7f46SBen Skeggs 
4713de7f46SBen Skeggs int
gk20a_fifo_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_fifo ** pfifo)48ab0db2bdSBen Skeggs gk20a_fifo_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst,
49ab0db2bdSBen Skeggs 	       struct nvkm_fifo **pfifo)
5013de7f46SBen Skeggs {
51*06db7fdeSBen Skeggs 	return nvkm_fifo_new_(&gk20a_fifo, device, type, inst, pfifo);
5213de7f46SBen Skeggs }
53