2 * Copyright 2013 Red Hat Inc.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
22 * Authors: Ben Skeggs <bskeggs@redhat.com>
27 static struct nvc0_graph_init
28 nvc3_grctx_init_tpc[] = {
29 { 0x419818, 1, 0x04, 0x00000000 },
30 { 0x41983c, 1, 0x04, 0x00038bc7 },
31 { 0x419848, 1, 0x04, 0x00000000 },
32 { 0x419864, 1, 0x04, 0x0000012a },
33 { 0x419888, 1, 0x04, 0x00000000 },
34 { 0x419a00, 1, 0x04, 0x000001f0 },
35 { 0x419a04, 1, 0x04, 0x00000001 },
36 { 0x419a08, 1, 0x04, 0x00000023 },
37 { 0x419a0c, 1, 0x04, 0x00020000 },
38 { 0x419a10, 1, 0x04, 0x00000000 },
39 { 0x419a14, 1, 0x04, 0x00000200 },
40 { 0x419a1c, 1, 0x04, 0x00000000 },
41 { 0x419a20, 1, 0x04, 0x00000800 },
42 { 0x419ac4, 1, 0x04, 0x0007f440 },
43 { 0x419b00, 1, 0x04, 0x0a418820 },
44 { 0x419b04, 1, 0x04, 0x062080e6 },
45 { 0x419b08, 1, 0x04, 0x020398a4 },
46 { 0x419b0c, 1, 0x04, 0x0e629062 },
47 { 0x419b10, 1, 0x04, 0x0a418820 },
48 { 0x419b14, 1, 0x04, 0x000000e6 },
49 { 0x419bd0, 1, 0x04, 0x00900103 },
50 { 0x419be0, 1, 0x04, 0x00000001 },
51 { 0x419be4, 1, 0x04, 0x00000000 },
52 { 0x419c00, 1, 0x04, 0x00000002 },
53 { 0x419c04, 1, 0x04, 0x00000006 },
54 { 0x419c08, 1, 0x04, 0x00000002 },
55 { 0x419c20, 1, 0x04, 0x00000000 },
56 { 0x419cb0, 1, 0x04, 0x00020048 },
57 { 0x419ce8, 1, 0x04, 0x00000000 },
58 { 0x419cf4, 1, 0x04, 0x00000183 },
59 { 0x419d20, 1, 0x04, 0x02180000 },
60 { 0x419d24, 1, 0x04, 0x00001fff },
61 { 0x419e04, 3, 0x04, 0x00000000 },
62 { 0x419e10, 1, 0x04, 0x00000002 },
63 { 0x419e44, 1, 0x04, 0x001beff2 },
64 { 0x419e48, 1, 0x04, 0x00000000 },
65 { 0x419e4c, 1, 0x04, 0x0000000f },
66 { 0x419e50, 17, 0x04, 0x00000000 },
67 { 0x419e98, 1, 0x04, 0x00000000 },
68 { 0x419ee0, 1, 0x04, 0x00011110 },
69 { 0x419f30, 11, 0x04, 0x00000000 },
73 struct nvc0_graph_init *
74 nvc3_grctx_init_gpc[] = {
75 nvc0_grctx_init_gpc_0,
76 nvc0_grctx_init_gpc_1,
81 struct nouveau_oclass *
82 nvc3_grctx_oclass = &(struct nvc0_grctx_oclass) {
83 .base.handle = NV_ENGCTX(GR, 0xc3),
84 .base.ofuncs = &(struct nouveau_ofuncs) {
85 .ctor = nvc0_graph_context_ctor,
86 .dtor = nvc0_graph_context_dtor,
87 .init = _nouveau_graph_context_init,
88 .fini = _nouveau_graph_context_fini,
89 .rd32 = _nouveau_graph_context_rd32,
90 .wr32 = _nouveau_graph_context_wr32,
92 .main = nvc0_grctx_generate_main,
93 .mods = nvc0_grctx_generate_mods,
94 .unkn = nvc0_grctx_generate_unkn,
95 .hub = nvc0_grctx_init_hub,
96 .gpc = nvc3_grctx_init_gpc,
97 .icmd = nvc0_grctx_init_icmd,
98 .mthd = nvc0_grctx_init_mthd,