]>
Commit | Line | Data |
---|---|---|
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 | ||
c33b1e8c | 25 | #include "ctxnvc0.h" |
30f4e087 | 26 | |
c33b1e8c BS |
27 | /******************************************************************************* |
28 | * PGRAPH context register lists | |
29 | ******************************************************************************/ | |
30 | ||
b8bf04e1 | 31 | const struct nvc0_gr_init |
7e194533 | 32 | nvc4_grctx_init_tex_0[] = { |
30f4e087 BS |
33 | { 0x419a00, 1, 0x04, 0x000001f0 }, |
34 | { 0x419a04, 1, 0x04, 0x00000001 }, | |
35 | { 0x419a08, 1, 0x04, 0x00000023 }, | |
36 | { 0x419a0c, 1, 0x04, 0x00020000 }, | |
37 | { 0x419a10, 1, 0x04, 0x00000000 }, | |
38 | { 0x419a14, 1, 0x04, 0x00000200 }, | |
39 | { 0x419a1c, 1, 0x04, 0x00000000 }, | |
40 | { 0x419a20, 1, 0x04, 0x00000800 }, | |
41 | { 0x419ac4, 1, 0x04, 0x0007f440 }, | |
7e194533 BS |
42 | {} |
43 | }; | |
44 | ||
b8bf04e1 | 45 | const struct nvc0_gr_init |
7e194533 | 46 | nvc4_grctx_init_l1c_0[] = { |
30f4e087 BS |
47 | { 0x419cb0, 1, 0x04, 0x00020048 }, |
48 | { 0x419ce8, 1, 0x04, 0x00000000 }, | |
49 | { 0x419cf4, 1, 0x04, 0x00000183 }, | |
7e194533 BS |
50 | {} |
51 | }; | |
52 | ||
b8bf04e1 | 53 | const struct nvc0_gr_init |
7e194533 | 54 | nvc4_grctx_init_sm_0[] = { |
30f4e087 BS |
55 | { 0x419e04, 3, 0x04, 0x00000000 }, |
56 | { 0x419e10, 1, 0x04, 0x00000002 }, | |
57 | { 0x419e44, 1, 0x04, 0x001beff2 }, | |
58 | { 0x419e48, 1, 0x04, 0x00000000 }, | |
59 | { 0x419e4c, 1, 0x04, 0x0000000f }, | |
60 | { 0x419e50, 17, 0x04, 0x00000000 }, | |
61 | { 0x419e98, 1, 0x04, 0x00000000 }, | |
62 | { 0x419ee0, 1, 0x04, 0x00011110 }, | |
63 | { 0x419f30, 11, 0x04, 0x00000000 }, | |
64 | {} | |
65 | }; | |
66 | ||
b8bf04e1 | 67 | static const struct nvc0_gr_pack |
c33b1e8c | 68 | nvc4_grctx_pack_tpc[] = { |
7e194533 BS |
69 | { nvc0_grctx_init_pe_0 }, |
70 | { nvc4_grctx_init_tex_0 }, | |
71 | { nvc0_grctx_init_wwdx_0 }, | |
72 | { nvc0_grctx_init_mpc_0 }, | |
73 | { nvc4_grctx_init_l1c_0 }, | |
74 | { nvc0_grctx_init_tpccs_0 }, | |
75 | { nvc4_grctx_init_sm_0 }, | |
c33b1e8c | 76 | {} |
70f824ac BS |
77 | }; |
78 | ||
c33b1e8c BS |
79 | /******************************************************************************* |
80 | * PGRAPH context implementation | |
81 | ******************************************************************************/ | |
82 | ||
30f4e087 | 83 | struct nouveau_oclass * |
eeb0558e | 84 | nvc4_grctx_oclass = &(struct nvc0_grctx_oclass) { |
30f4e087 BS |
85 | .base.handle = NV_ENGCTX(GR, 0xc3), |
86 | .base.ofuncs = &(struct nouveau_ofuncs) { | |
b8bf04e1 BS |
87 | .ctor = nvc0_gr_context_ctor, |
88 | .dtor = nvc0_gr_context_dtor, | |
89 | .init = _nouveau_gr_context_init, | |
90 | .fini = _nouveau_gr_context_fini, | |
91 | .rd32 = _nouveau_gr_context_rd32, | |
92 | .wr32 = _nouveau_gr_context_wr32, | |
30f4e087 | 93 | }, |
c33b1e8c | 94 | .main = nvc0_grctx_generate_main, |
c33b1e8c BS |
95 | .unkn = nvc0_grctx_generate_unkn, |
96 | .hub = nvc0_grctx_pack_hub, | |
97 | .gpc = nvc0_grctx_pack_gpc, | |
98 | .zcull = nvc0_grctx_pack_zcull, | |
99 | .tpc = nvc4_grctx_pack_tpc, | |
100 | .icmd = nvc0_grctx_pack_icmd, | |
101 | .mthd = nvc0_grctx_pack_mthd, | |
aa2d58c3 BS |
102 | .bundle = nvc0_grctx_generate_bundle, |
103 | .bundle_size = 0x1800, | |
f331a15f BS |
104 | .pagepool = nvc0_grctx_generate_pagepool, |
105 | .pagepool_size = 0x8000, | |
67cfbfdf BS |
106 | .attrib = nvc0_grctx_generate_attrib, |
107 | .attrib_nr_max = 0x324, | |
108 | .attrib_nr = 0x218, | |
30f4e087 | 109 | }.base; |