1 | /* $NetBSD: nouveau_engine_graph_nvc8.c,v 1.1.1.1 2014/08/06 12:36:26 riastradh Exp $ */ |
2 | |
3 | /* |
4 | * Copyright 2013 Red Hat Inc. |
5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), |
8 | * to deal in the Software without restriction, including without limitation |
9 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, |
10 | * and/or sell copies of the Software, and to permit persons to whom the |
11 | * Software is furnished to do so, subject to the following conditions: |
12 | * |
13 | * The above copyright notice and this permission notice shall be included in |
14 | * all copies or substantial portions of the Software. |
15 | * |
16 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
17 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
18 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
19 | * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR |
20 | * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
21 | * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
22 | * OTHER DEALINGS IN THE SOFTWARE. |
23 | * |
24 | * Authors: Ben Skeggs <bskeggs@redhat.com> |
25 | */ |
26 | |
27 | #include <sys/cdefs.h> |
28 | __KERNEL_RCSID(0, "$NetBSD: nouveau_engine_graph_nvc8.c,v 1.1.1.1 2014/08/06 12:36:26 riastradh Exp $" ); |
29 | |
30 | #include "nvc0.h" |
31 | #include "ctxnvc0.h" |
32 | |
33 | /******************************************************************************* |
34 | * Graphics object classes |
35 | ******************************************************************************/ |
36 | |
37 | struct nouveau_oclass |
38 | nvc8_graph_sclass[] = { |
39 | { 0x902d, &nouveau_object_ofuncs }, |
40 | { 0x9039, &nouveau_object_ofuncs }, |
41 | { 0x9097, &nouveau_object_ofuncs }, |
42 | { 0x90c0, &nouveau_object_ofuncs }, |
43 | { 0x9197, &nouveau_object_ofuncs }, |
44 | { 0x9297, &nouveau_object_ofuncs }, |
45 | {} |
46 | }; |
47 | |
48 | /******************************************************************************* |
49 | * PGRAPH register lists |
50 | ******************************************************************************/ |
51 | |
52 | static const struct nvc0_graph_init |
53 | nvc8_graph_init_sm_0[] = { |
54 | { 0x419e00, 1, 0x04, 0x00000000 }, |
55 | { 0x419ea0, 1, 0x04, 0x00000000 }, |
56 | { 0x419ea4, 1, 0x04, 0x00000100 }, |
57 | { 0x419ea8, 1, 0x04, 0x00001100 }, |
58 | { 0x419eac, 1, 0x04, 0x11100f02 }, |
59 | { 0x419eb0, 1, 0x04, 0x00000003 }, |
60 | { 0x419eb4, 4, 0x04, 0x00000000 }, |
61 | { 0x419ec8, 1, 0x04, 0x06060618 }, |
62 | { 0x419ed0, 1, 0x04, 0x0eff0e38 }, |
63 | { 0x419ed4, 1, 0x04, 0x011104f1 }, |
64 | { 0x419edc, 1, 0x04, 0x00000000 }, |
65 | { 0x419f00, 1, 0x04, 0x00000000 }, |
66 | { 0x419f2c, 1, 0x04, 0x00000000 }, |
67 | {} |
68 | }; |
69 | |
70 | static const struct nvc0_graph_pack |
71 | nvc8_graph_pack_mmio[] = { |
72 | { nvc0_graph_init_main_0 }, |
73 | { nvc0_graph_init_fe_0 }, |
74 | { nvc0_graph_init_pri_0 }, |
75 | { nvc0_graph_init_rstr2d_0 }, |
76 | { nvc0_graph_init_pd_0 }, |
77 | { nvc0_graph_init_ds_0 }, |
78 | { nvc0_graph_init_scc_0 }, |
79 | { nvc0_graph_init_prop_0 }, |
80 | { nvc0_graph_init_gpc_unk_0 }, |
81 | { nvc0_graph_init_setup_0 }, |
82 | { nvc0_graph_init_crstr_0 }, |
83 | { nvc1_graph_init_setup_1 }, |
84 | { nvc0_graph_init_zcull_0 }, |
85 | { nvc0_graph_init_gpm_0 }, |
86 | { nvc0_graph_init_gpc_unk_1 }, |
87 | { nvc0_graph_init_gcc_0 }, |
88 | { nvc0_graph_init_tpccs_0 }, |
89 | { nvc0_graph_init_tex_0 }, |
90 | { nvc0_graph_init_pe_0 }, |
91 | { nvc0_graph_init_l1c_0 }, |
92 | { nvc0_graph_init_wwdx_0 }, |
93 | { nvc0_graph_init_tpccs_1 }, |
94 | { nvc0_graph_init_mpc_0 }, |
95 | { nvc8_graph_init_sm_0 }, |
96 | { nvc0_graph_init_be_0 }, |
97 | { nvc0_graph_init_fe_1 }, |
98 | { nvc0_graph_init_pe_1 }, |
99 | {} |
100 | }; |
101 | |
102 | /******************************************************************************* |
103 | * PGRAPH engine/subdev functions |
104 | ******************************************************************************/ |
105 | |
106 | struct nouveau_oclass * |
107 | nvc8_graph_oclass = &(struct nvc0_graph_oclass) { |
108 | .base.handle = NV_ENGINE(GR, 0xc8), |
109 | .base.ofuncs = &(struct nouveau_ofuncs) { |
110 | .ctor = nvc0_graph_ctor, |
111 | .dtor = nvc0_graph_dtor, |
112 | .init = nvc0_graph_init, |
113 | .fini = _nouveau_graph_fini, |
114 | }, |
115 | .cclass = &nvc8_grctx_oclass, |
116 | .sclass = nvc8_graph_sclass, |
117 | .mmio = nvc8_graph_pack_mmio, |
118 | .fecs.ucode = &nvc0_graph_fecs_ucode, |
119 | .gpccs.ucode = &nvc0_graph_gpccs_ucode, |
120 | }.base; |
121 | |