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 /*******************************************************************************
28 * PGRAPH engine/subdev functions
29 ******************************************************************************/
31 struct nvc0_graph_init
32 nvc3_graph_init_unk58xx[] = {
33 { 0x405844, 1, 0x04, 0x00ffffff },
34 { 0x405850, 1, 0x04, 0x00000000 },
35 { 0x405900, 1, 0x04, 0x00002834 },
36 { 0x405908, 1, 0x04, 0x00000000 },
40 static struct nvc0_graph_init
41 nvc3_graph_init_tpc[] = {
42 { 0x419d08, 2, 0x04, 0x00000000 },
43 { 0x419d10, 1, 0x04, 0x00000014 },
44 { 0x419ab0, 1, 0x04, 0x00000000 },
45 { 0x419ac8, 1, 0x04, 0x00000000 },
46 { 0x419ab8, 1, 0x04, 0x000000e7 },
47 { 0x419abc, 2, 0x04, 0x00000000 },
48 { 0x41980c, 3, 0x04, 0x00000000 },
49 { 0x419844, 1, 0x04, 0x00000000 },
50 { 0x41984c, 1, 0x04, 0x00005bc5 },
51 { 0x419850, 4, 0x04, 0x00000000 },
52 { 0x419880, 1, 0x04, 0x00000002 },
53 { 0x419c98, 1, 0x04, 0x00000000 },
54 { 0x419ca8, 1, 0x04, 0x80000000 },
55 { 0x419cb4, 1, 0x04, 0x00000000 },
56 { 0x419cb8, 1, 0x04, 0x00008bf4 },
57 { 0x419cbc, 1, 0x04, 0x28137606 },
58 { 0x419cc0, 2, 0x04, 0x00000000 },
59 { 0x419bd4, 1, 0x04, 0x00800000 },
60 { 0x419bdc, 1, 0x04, 0x00000000 },
61 { 0x419d2c, 1, 0x04, 0x00000000 },
62 { 0x419c0c, 1, 0x04, 0x00000000 },
63 { 0x419e00, 1, 0x04, 0x00000000 },
64 { 0x419ea0, 1, 0x04, 0x00000000 },
65 { 0x419ea4, 1, 0x04, 0x00000100 },
66 { 0x419ea8, 1, 0x04, 0x00001100 },
67 { 0x419eac, 1, 0x04, 0x11100702 },
68 { 0x419eb0, 1, 0x04, 0x00000003 },
69 { 0x419eb4, 4, 0x04, 0x00000000 },
70 { 0x419ec8, 1, 0x04, 0x0e063818 },
71 { 0x419ecc, 1, 0x04, 0x0e060e06 },
72 { 0x419ed0, 1, 0x04, 0x00003818 },
73 { 0x419ed4, 1, 0x04, 0x011104f1 },
74 { 0x419edc, 1, 0x04, 0x00000000 },
75 { 0x419f00, 1, 0x04, 0x00000000 },
76 { 0x419f2c, 1, 0x04, 0x00000000 },
80 static struct nvc0_graph_init *
81 nvc3_graph_init_mmio[] = {
83 nvc0_graph_init_unk40xx,
84 nvc0_graph_init_unk44xx,
85 nvc0_graph_init_unk78xx,
86 nvc0_graph_init_unk60xx,
87 nvc3_graph_init_unk58xx,
88 nvc0_graph_init_unk80xx,
91 nvc0_graph_init_unk88xx,
96 struct nouveau_oclass *
97 nvc3_graph_oclass = &(struct nvc0_graph_oclass) {
98 .base.handle = NV_ENGINE(GR, 0xc3),
99 .base.ofuncs = &(struct nouveau_ofuncs) {
100 .ctor = nvc0_graph_ctor,
101 .dtor = nvc0_graph_dtor,
102 .init = nvc0_graph_init,
103 .fini = _nouveau_graph_fini,
105 .cclass = &nvc3_grctx_oclass,
106 .sclass = nvc0_graph_sclass,
107 .mmio = nvc3_graph_init_mmio,
108 .fecs.ucode = &nvc0_graph_fecs_ucode,
109 .gpccs.ucode = &nvc0_graph_gpccs_ucode,