drm/gf100-/gr: tidy reg/ctx initval lists, mostly by giving them names
[deliverable/linux.git] / drivers / gpu / drm / nouveau / core / engine / graph / nvc8.c
CommitLineData
30f4e087
BS
1/*
2 * Copyright 2013 Red Hat Inc.
3 *
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:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
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.
21 *
22 * Authors: Ben Skeggs <bskeggs@redhat.com>
23 */
24
25#include "nvc0.h"
c33b1e8c 26#include "ctxnvc0.h"
30f4e087
BS
27
28/*******************************************************************************
29 * Graphics object classes
30 ******************************************************************************/
31
32struct nouveau_oclass
33nvc8_graph_sclass[] = {
34 { 0x902d, &nouveau_object_ofuncs },
35 { 0x9039, &nouveau_object_ofuncs },
36 { 0x9097, &nouveau_object_ofuncs },
37 { 0x90c0, &nouveau_object_ofuncs },
38 { 0x9197, &nouveau_object_ofuncs },
39 { 0x9297, &nouveau_object_ofuncs },
40 {}
41};
42
43/*******************************************************************************
c33b1e8c 44 * PGRAPH register lists
30f4e087
BS
45 ******************************************************************************/
46
c33b1e8c
BS
47static const struct nvc0_graph_init
48nvc8_graph_init_gpc_0[] = {
30f4e087
BS
49 { 0x4184a0, 1, 0x04, 0x00000000 },
50 { 0x418604, 1, 0x04, 0x00000000 },
51 { 0x418680, 1, 0x04, 0x00000000 },
52 { 0x418714, 1, 0x04, 0x80000000 },
53 { 0x418384, 1, 0x04, 0x00000000 },
54 { 0x418814, 3, 0x04, 0x00000000 },
55 { 0x418b04, 1, 0x04, 0x00000000 },
56 { 0x4188c8, 2, 0x04, 0x00000000 },
57 { 0x4188d0, 1, 0x04, 0x00010000 },
58 { 0x4188d4, 1, 0x04, 0x00000001 },
59 { 0x418910, 1, 0x04, 0x00010001 },
60 { 0x418914, 1, 0x04, 0x00000301 },
61 { 0x418918, 1, 0x04, 0x00800000 },
62 { 0x418980, 1, 0x04, 0x77777770 },
63 { 0x418984, 3, 0x04, 0x77777777 },
64 { 0x418c04, 1, 0x04, 0x00000000 },
65 { 0x418c88, 1, 0x04, 0x00000000 },
66 { 0x418d00, 1, 0x04, 0x00000000 },
67 { 0x418f08, 1, 0x04, 0x00000000 },
68 { 0x418e00, 1, 0x04, 0x00000050 },
69 { 0x418e08, 1, 0x04, 0x00000000 },
70 { 0x41900c, 1, 0x04, 0x00000000 },
71 { 0x419018, 1, 0x04, 0x00000000 },
72 {}
73};
74
c33b1e8c
BS
75static const struct nvc0_graph_init
76nvc8_graph_init_tpc_0[] = {
30f4e087
BS
77 { 0x419d08, 2, 0x04, 0x00000000 },
78 { 0x419d10, 1, 0x04, 0x00000014 },
79 { 0x419ab0, 1, 0x04, 0x00000000 },
80 { 0x419ab8, 1, 0x04, 0x000000e7 },
81 { 0x419abc, 2, 0x04, 0x00000000 },
82 { 0x41980c, 3, 0x04, 0x00000000 },
83 { 0x419844, 1, 0x04, 0x00000000 },
84 { 0x41984c, 1, 0x04, 0x00005bc5 },
85 { 0x419850, 4, 0x04, 0x00000000 },
86 { 0x419c98, 1, 0x04, 0x00000000 },
87 { 0x419ca8, 1, 0x04, 0x80000000 },
88 { 0x419cb4, 1, 0x04, 0x00000000 },
89 { 0x419cb8, 1, 0x04, 0x00008bf4 },
90 { 0x419cbc, 1, 0x04, 0x28137606 },
91 { 0x419cc0, 2, 0x04, 0x00000000 },
92 { 0x419bd4, 1, 0x04, 0x00800000 },
93 { 0x419bdc, 1, 0x04, 0x00000000 },
94 { 0x419d2c, 1, 0x04, 0x00000000 },
95 { 0x419c0c, 1, 0x04, 0x00000000 },
96 { 0x419e00, 1, 0x04, 0x00000000 },
97 { 0x419ea0, 1, 0x04, 0x00000000 },
98 { 0x419ea4, 1, 0x04, 0x00000100 },
99 { 0x419ea8, 1, 0x04, 0x00001100 },
100 { 0x419eac, 1, 0x04, 0x11100f02 },
101 { 0x419eb0, 1, 0x04, 0x00000003 },
102 { 0x419eb4, 4, 0x04, 0x00000000 },
103 { 0x419ec8, 1, 0x04, 0x06060618 },
104 { 0x419ed0, 1, 0x04, 0x0eff0e38 },
105 { 0x419ed4, 1, 0x04, 0x011104f1 },
106 { 0x419edc, 1, 0x04, 0x00000000 },
107 { 0x419f00, 1, 0x04, 0x00000000 },
108 { 0x419f2c, 1, 0x04, 0x00000000 },
109 {}
110};
111
c33b1e8c
BS
112static const struct nvc0_graph_pack
113nvc8_graph_pack_mmio[] = {
114 { nvc0_graph_init_main_0 },
115 { nvc0_graph_init_fe_0 },
116 { nvc0_graph_init_pri_0 },
117 { nvc0_graph_init_rstr2d_0 },
118 { nvc0_graph_init_pd_0 },
119 { nvc0_graph_init_ds_0 },
120 { nvc0_graph_init_scc_0 },
121 { nvc8_graph_init_gpc_0 },
122 { nvc8_graph_init_tpc_0 },
123 { nvc0_graph_init_be_0 },
124 { nvc0_graph_init_fe_1 },
125 { nvc0_graph_init_tpc_1 },
126 {}
30f4e087
BS
127};
128
c33b1e8c
BS
129/*******************************************************************************
130 * PGRAPH engine/subdev functions
131 ******************************************************************************/
132
30f4e087
BS
133struct nouveau_oclass *
134nvc8_graph_oclass = &(struct nvc0_graph_oclass) {
135 .base.handle = NV_ENGINE(GR, 0xc8),
136 .base.ofuncs = &(struct nouveau_ofuncs) {
137 .ctor = nvc0_graph_ctor,
138 .dtor = nvc0_graph_dtor,
139 .init = nvc0_graph_init,
140 .fini = _nouveau_graph_fini,
141 },
142 .cclass = &nvc8_grctx_oclass,
143 .sclass = nvc8_graph_sclass,
c33b1e8c 144 .mmio = nvc8_graph_pack_mmio,
30f4e087
BS
145 .fecs.ucode = &nvc0_graph_fecs_ucode,
146 .gpccs.ucode = &nvc0_graph_gpccs_ucode,
147}.base;
This page took 0.093391 seconds and 5 git commands to generate.