1c85ee6caSBen Skeggs /*
2c85ee6caSBen Skeggs * Copyright 2012 Red Hat Inc.
3c85ee6caSBen Skeggs *
4c85ee6caSBen Skeggs * Permission is hereby granted, free of charge, to any person obtaining a
5c85ee6caSBen Skeggs * copy of this software and associated documentation files (the "Software"),
6c85ee6caSBen Skeggs * to deal in the Software without restriction, including without limitation
7c85ee6caSBen Skeggs * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8c85ee6caSBen Skeggs * and/or sell copies of the Software, and to permit persons to whom the
9c85ee6caSBen Skeggs * Software is furnished to do so, subject to the following conditions:
10c85ee6caSBen Skeggs *
11c85ee6caSBen Skeggs * The above copyright notice and this permission notice shall be included in
12c85ee6caSBen Skeggs * all copies or substantial portions of the Software.
13c85ee6caSBen Skeggs *
14c85ee6caSBen Skeggs * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15c85ee6caSBen Skeggs * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16c85ee6caSBen Skeggs * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17c85ee6caSBen Skeggs * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18c85ee6caSBen Skeggs * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19c85ee6caSBen Skeggs * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20c85ee6caSBen Skeggs * OTHER DEALINGS IN THE SOFTWARE.
21c85ee6caSBen Skeggs *
22c85ee6caSBen Skeggs * Authors: Ben Skeggs
23c85ee6caSBen Skeggs */
24c85ee6caSBen Skeggs #include "nv50.h"
25c85ee6caSBen Skeggs
260233a9f4SBen Skeggs #include <nvif/class.h>
270233a9f4SBen Skeggs
28c85ee6caSBen Skeggs static const struct nvkm_gr_func
29c85ee6caSBen Skeggs gt200_gr = {
30c85ee6caSBen Skeggs .init = nv50_gr_init,
31c85ee6caSBen Skeggs .intr = nv50_gr_intr,
32c85ee6caSBen Skeggs .chan_new = nv50_gr_chan_new,
33c85ee6caSBen Skeggs .tlb_flush = g84_gr_tlb_flush,
34c85ee6caSBen Skeggs .units = nv50_gr_units,
35c85ee6caSBen Skeggs .sclass = {
360233a9f4SBen Skeggs { -1, -1, NV_NULL_CLASS, &nv50_gr_object },
370233a9f4SBen Skeggs { -1, -1, NV50_TWOD, &nv50_gr_object },
380233a9f4SBen Skeggs { -1, -1, NV50_MEMORY_TO_MEMORY_FORMAT, &nv50_gr_object },
390233a9f4SBen Skeggs { -1, -1, NV50_COMPUTE, &nv50_gr_object },
400233a9f4SBen Skeggs { -1, -1, GT200_TESLA, &nv50_gr_object },
41c85ee6caSBen Skeggs {}
42c85ee6caSBen Skeggs }
43c85ee6caSBen Skeggs };
44c85ee6caSBen Skeggs
45c85ee6caSBen Skeggs int
gt200_gr_new(struct nvkm_device * device,enum nvkm_subdev_type type,int inst,struct nvkm_gr ** pgr)46*864d37c3SBen Skeggs gt200_gr_new(struct nvkm_device *device, enum nvkm_subdev_type type, int inst, struct nvkm_gr **pgr)
47c85ee6caSBen Skeggs {
48*864d37c3SBen Skeggs return nv50_gr_new_(>200_gr, device, type, inst, pgr);
49c85ee6caSBen Skeggs }
50