17c4f87c9SBen Skeggs /* 27c4f87c9SBen Skeggs * Copyright 2016 Red Hat Inc. 37c4f87c9SBen Skeggs * 47c4f87c9SBen Skeggs * Permission is hereby granted, free of charge, to any person obtaining a 57c4f87c9SBen Skeggs * copy of this software and associated documentation files (the "Software"), 67c4f87c9SBen Skeggs * to deal in the Software without restriction, including without limitation 77c4f87c9SBen Skeggs * the rights to use, copy, modify, merge, publish, distribute, sublicense, 87c4f87c9SBen Skeggs * and/or sell copies of the Software, and to permit persons to whom the 97c4f87c9SBen Skeggs * Software is furnished to do so, subject to the following conditions: 107c4f87c9SBen Skeggs * 117c4f87c9SBen Skeggs * The above copyright notice and this permission notice shall be included in 127c4f87c9SBen Skeggs * all copies or substantial portions of the Software. 137c4f87c9SBen Skeggs * 147c4f87c9SBen Skeggs * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 157c4f87c9SBen Skeggs * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 167c4f87c9SBen Skeggs * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 177c4f87c9SBen Skeggs * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 187c4f87c9SBen Skeggs * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 197c4f87c9SBen Skeggs * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 207c4f87c9SBen Skeggs * OTHER DEALINGS IN THE SOFTWARE. 217c4f87c9SBen Skeggs * 227c4f87c9SBen Skeggs * Authors: Ben Skeggs 237c4f87c9SBen Skeggs */ 247c4f87c9SBen Skeggs #include "gk104.h" 257c4f87c9SBen Skeggs #include "changk104.h" 267c4f87c9SBen Skeggs 277c4f87c9SBen Skeggs static const struct nvkm_fifo_func 287c4f87c9SBen Skeggs gm107_fifo = { 297c4f87c9SBen Skeggs .dtor = gk104_fifo_dtor, 307c4f87c9SBen Skeggs .oneinit = gk104_fifo_oneinit, 317c4f87c9SBen Skeggs .init = gk104_fifo_init, 327c4f87c9SBen Skeggs .fini = gk104_fifo_fini, 337c4f87c9SBen Skeggs .intr = gk104_fifo_intr, 347c4f87c9SBen Skeggs .uevent_init = gk104_fifo_uevent_init, 357c4f87c9SBen Skeggs .uevent_fini = gk104_fifo_uevent_fini, 367c4f87c9SBen Skeggs .chan = { 377c4f87c9SBen Skeggs &gk110_fifo_gpfifo_oclass, 387c4f87c9SBen Skeggs NULL 397c4f87c9SBen Skeggs }, 407c4f87c9SBen Skeggs }; 417c4f87c9SBen Skeggs 427c4f87c9SBen Skeggs int 437c4f87c9SBen Skeggs gm107_fifo_new(struct nvkm_device *device, int index, struct nvkm_fifo **pfifo) 447c4f87c9SBen Skeggs { 457c4f87c9SBen Skeggs return gk104_fifo_new_(&gm107_fifo, device, index, 2048, pfifo); 467c4f87c9SBen Skeggs } 47