aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2014-06-12 07:22:32 -0400
committerBen Skeggs <bskeggs@redhat.com>2014-08-09 15:11:07 -0400
commit579b7f3f66a2588f788911e15ef3f9c1d88e1048 (patch)
tree9e9d17db62ae2857d7cdd4eae5ed3b6cacbc28d6 /drivers/gpu
parent36b990260d501ffec0a38d3211497ee567ee2430 (diff)
drm/gk110b/gr: initvals differ from gk110
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/nouveau/Makefile2
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/device/nve0.c2
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/ctxgk110b.c94
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.h10
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/ctxnvf0.c12
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/gk110b.c116
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h9
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/nvf0.c12
-rw-r--r--drivers/gpu/drm/nouveau/core/include/engine/graph.h1
9 files changed, 244 insertions, 14 deletions
diff --git a/drivers/gpu/drm/nouveau/Makefile b/drivers/gpu/drm/nouveau/Makefile
index 8f0dd8e32e19..b5b108115c74 100644
--- a/drivers/gpu/drm/nouveau/Makefile
+++ b/drivers/gpu/drm/nouveau/Makefile
@@ -271,6 +271,7 @@ nouveau-y += core/engine/graph/ctxnvd9.o
271nouveau-y += core/engine/graph/ctxnve4.o 271nouveau-y += core/engine/graph/ctxnve4.o
272nouveau-y += core/engine/graph/ctxgk20a.o 272nouveau-y += core/engine/graph/ctxgk20a.o
273nouveau-y += core/engine/graph/ctxnvf0.o 273nouveau-y += core/engine/graph/ctxnvf0.o
274nouveau-y += core/engine/graph/ctxgk110b.o
274nouveau-y += core/engine/graph/ctxnv108.o 275nouveau-y += core/engine/graph/ctxnv108.o
275nouveau-y += core/engine/graph/ctxgm107.o 276nouveau-y += core/engine/graph/ctxgm107.o
276nouveau-y += core/engine/graph/nv04.o 277nouveau-y += core/engine/graph/nv04.o
@@ -292,6 +293,7 @@ nouveau-y += core/engine/graph/nvd9.o
292nouveau-y += core/engine/graph/nve4.o 293nouveau-y += core/engine/graph/nve4.o
293nouveau-y += core/engine/graph/gk20a.o 294nouveau-y += core/engine/graph/gk20a.o
294nouveau-y += core/engine/graph/nvf0.o 295nouveau-y += core/engine/graph/nvf0.o
296nouveau-y += core/engine/graph/gk110b.o
295nouveau-y += core/engine/graph/nv108.o 297nouveau-y += core/engine/graph/nv108.o
296nouveau-y += core/engine/graph/gm107.o 298nouveau-y += core/engine/graph/gm107.o
297nouveau-y += core/engine/mpeg/nv31.o 299nouveau-y += core/engine/mpeg/nv31.o
diff --git a/drivers/gpu/drm/nouveau/core/engine/device/nve0.c b/drivers/gpu/drm/nouveau/core/engine/device/nve0.c
index 7298438f91d1..d07eeca1c2d6 100644
--- a/drivers/gpu/drm/nouveau/core/engine/device/nve0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/device/nve0.c
@@ -229,7 +229,7 @@ nve0_identify(struct nouveau_device *device)
229 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nvd0_dmaeng_oclass; 229 device->oclass[NVDEV_ENGINE_DMAOBJ ] = &nvd0_dmaeng_oclass;
230 device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass; 230 device->oclass[NVDEV_ENGINE_FIFO ] = nve0_fifo_oclass;
231 device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass; 231 device->oclass[NVDEV_ENGINE_SW ] = nvc0_software_oclass;
232 device->oclass[NVDEV_ENGINE_GR ] = nvf0_graph_oclass; 232 device->oclass[NVDEV_ENGINE_GR ] = gk110b_graph_oclass;
233 device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass; 233 device->oclass[NVDEV_ENGINE_DISP ] = nvf0_disp_oclass;
234 device->oclass[NVDEV_ENGINE_COPY0 ] = &nve0_copy0_oclass; 234 device->oclass[NVDEV_ENGINE_COPY0 ] = &nve0_copy0_oclass;
235 device->oclass[NVDEV_ENGINE_COPY1 ] = &nve0_copy1_oclass; 235 device->oclass[NVDEV_ENGINE_COPY1 ] = &nve0_copy1_oclass;
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxgk110b.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxgk110b.c
new file mode 100644
index 000000000000..4ae70c11b6e6
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxgk110b.c
@@ -0,0 +1,94 @@
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 "ctxnvc0.h"
26
27/*******************************************************************************
28 * PGRAPH context register lists
29 ******************************************************************************/
30
31static const struct nvc0_graph_init
32gk110b_grctx_init_sm_0[] = {
33 { 0x419e04, 1, 0x04, 0x00000000 },
34 { 0x419e08, 1, 0x04, 0x0000001d },
35 { 0x419e0c, 1, 0x04, 0x00000000 },
36 { 0x419e10, 1, 0x04, 0x00001c02 },
37 { 0x419e44, 1, 0x04, 0x0013eff2 },
38 { 0x419e48, 1, 0x04, 0x00000000 },
39 { 0x419e4c, 1, 0x04, 0x0000007f },
40 { 0x419e50, 2, 0x04, 0x00000000 },
41 { 0x419e58, 1, 0x04, 0x00000001 },
42 { 0x419e5c, 3, 0x04, 0x00000000 },
43 { 0x419e68, 1, 0x04, 0x00000002 },
44 { 0x419e6c, 12, 0x04, 0x00000000 },
45 { 0x419eac, 1, 0x04, 0x00001f8f },
46 { 0x419eb0, 1, 0x04, 0x0db00d2f },
47 { 0x419eb8, 1, 0x04, 0x00000000 },
48 { 0x419ec8, 1, 0x04, 0x0001304f },
49 { 0x419f30, 4, 0x04, 0x00000000 },
50 { 0x419f40, 1, 0x04, 0x00000018 },
51 { 0x419f44, 3, 0x04, 0x00000000 },
52 { 0x419f58, 1, 0x04, 0x00000000 },
53 { 0x419f70, 1, 0x04, 0x00006300 },
54 { 0x419f78, 1, 0x04, 0x000000eb },
55 { 0x419f7c, 1, 0x04, 0x00000404 },
56 {}
57};
58
59static const struct nvc0_graph_pack
60gk110b_grctx_pack_tpc[] = {
61 { nvd7_grctx_init_pe_0 },
62 { nvf0_grctx_init_tex_0 },
63 { nvf0_grctx_init_mpc_0 },
64 { nvf0_grctx_init_l1c_0 },
65 { gk110b_grctx_init_sm_0 },
66 {}
67};
68
69/*******************************************************************************
70 * PGRAPH context implementation
71 ******************************************************************************/
72
73struct nouveau_oclass *
74gk110b_grctx_oclass = &(struct nvc0_grctx_oclass) {
75 .base.handle = NV_ENGCTX(GR, 0xf1),
76 .base.ofuncs = &(struct nouveau_ofuncs) {
77 .ctor = nvc0_graph_context_ctor,
78 .dtor = nvc0_graph_context_dtor,
79 .init = _nouveau_graph_context_init,
80 .fini = _nouveau_graph_context_fini,
81 .rd32 = _nouveau_graph_context_rd32,
82 .wr32 = _nouveau_graph_context_wr32,
83 },
84 .main = nve4_grctx_generate_main,
85 .mods = nvf0_grctx_generate_mods,
86 .unkn = nve4_grctx_generate_unkn,
87 .hub = nvf0_grctx_pack_hub,
88 .gpc = nvf0_grctx_pack_gpc,
89 .zcull = nvc0_grctx_pack_zcull,
90 .tpc = gk110b_grctx_pack_tpc,
91 .ppc = nvf0_grctx_pack_ppc,
92 .icmd = nvf0_grctx_pack_icmd,
93 .mthd = nvf0_grctx_pack_mthd,
94}.base;
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.h b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.h
index 8da8b627b9d0..03a934457c26 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvc0.h
@@ -75,7 +75,10 @@ void nve4_grctx_generate_mods(struct nvc0_graph_priv *, struct nvc0_grctx *);
75void nve4_grctx_generate_unkn(struct nvc0_graph_priv *); 75void nve4_grctx_generate_unkn(struct nvc0_graph_priv *);
76void nve4_grctx_generate_r418bb8(struct nvc0_graph_priv *); 76void nve4_grctx_generate_r418bb8(struct nvc0_graph_priv *);
77 77
78void nvf0_grctx_generate_mods(struct nvc0_graph_priv *, struct nvc0_grctx *);
79
78extern struct nouveau_oclass *nvf0_grctx_oclass; 80extern struct nouveau_oclass *nvf0_grctx_oclass;
81extern struct nouveau_oclass *gk110b_grctx_oclass;
79extern struct nouveau_oclass *nv108_grctx_oclass; 82extern struct nouveau_oclass *nv108_grctx_oclass;
80extern struct nouveau_oclass *gm107_grctx_oclass; 83extern struct nouveau_oclass *gm107_grctx_oclass;
81 84
@@ -160,16 +163,23 @@ extern const struct nvc0_graph_pack nve4_grctx_pack_ppc[];
160extern const struct nvc0_graph_pack nve4_grctx_pack_icmd[]; 163extern const struct nvc0_graph_pack nve4_grctx_pack_icmd[];
161extern const struct nvc0_graph_init nve4_grctx_init_a097_0[]; 164extern const struct nvc0_graph_init nve4_grctx_init_a097_0[];
162 165
166extern const struct nvc0_graph_pack nvf0_grctx_pack_icmd[];
167
163extern const struct nvc0_graph_pack nvf0_grctx_pack_mthd[]; 168extern const struct nvc0_graph_pack nvf0_grctx_pack_mthd[];
164 169
170extern const struct nvc0_graph_pack nvf0_grctx_pack_hub[];
165extern const struct nvc0_graph_init nvf0_grctx_init_pri_0[]; 171extern const struct nvc0_graph_init nvf0_grctx_init_pri_0[];
166extern const struct nvc0_graph_init nvf0_grctx_init_cwd_0[]; 172extern const struct nvc0_graph_init nvf0_grctx_init_cwd_0[];
167 173
174extern const struct nvc0_graph_pack nvf0_grctx_pack_gpc[];
168extern const struct nvc0_graph_init nvf0_grctx_init_gpc_unk_2[]; 175extern const struct nvc0_graph_init nvf0_grctx_init_gpc_unk_2[];
169 176
177extern const struct nvc0_graph_init nvf0_grctx_init_tex_0[];
170extern const struct nvc0_graph_init nvf0_grctx_init_mpc_0[]; 178extern const struct nvc0_graph_init nvf0_grctx_init_mpc_0[];
171extern const struct nvc0_graph_init nvf0_grctx_init_l1c_0[]; 179extern const struct nvc0_graph_init nvf0_grctx_init_l1c_0[];
172 180
181extern const struct nvc0_graph_pack nvf0_grctx_pack_ppc[];
182
173extern const struct nvc0_graph_init nv108_grctx_init_rstr2d_0[]; 183extern const struct nvc0_graph_init nv108_grctx_init_rstr2d_0[];
174 184
175extern const struct nvc0_graph_init nv108_grctx_init_prop_0[]; 185extern const struct nvc0_graph_init nv108_grctx_init_prop_0[];
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvf0.c b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvf0.c
index dec03f04114d..3e6ac2703d72 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvf0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/ctxnvf0.c
@@ -279,7 +279,7 @@ nvf0_grctx_init_icmd_0[] = {
279 {} 279 {}
280}; 280};
281 281
282static const struct nvc0_graph_pack 282const struct nvc0_graph_pack
283nvf0_grctx_pack_icmd[] = { 283nvf0_grctx_pack_icmd[] = {
284 { nvf0_grctx_init_icmd_0 }, 284 { nvf0_grctx_init_icmd_0 },
285 {} 285 {}
@@ -668,7 +668,7 @@ nvf0_grctx_init_be_0[] = {
668 {} 668 {}
669}; 669};
670 670
671static const struct nvc0_graph_pack 671const struct nvc0_graph_pack
672nvf0_grctx_pack_hub[] = { 672nvf0_grctx_pack_hub[] = {
673 { nvc0_grctx_init_main_0 }, 673 { nvc0_grctx_init_main_0 },
674 { nvf0_grctx_init_fe_0 }, 674 { nvf0_grctx_init_fe_0 },
@@ -704,7 +704,7 @@ nvf0_grctx_init_gpc_unk_2[] = {
704 {} 704 {}
705}; 705};
706 706
707static const struct nvc0_graph_pack 707const struct nvc0_graph_pack
708nvf0_grctx_pack_gpc[] = { 708nvf0_grctx_pack_gpc[] = {
709 { nvc0_grctx_init_gpc_unk_0 }, 709 { nvc0_grctx_init_gpc_unk_0 },
710 { nvd9_grctx_init_prop_0 }, 710 { nvd9_grctx_init_prop_0 },
@@ -718,7 +718,7 @@ nvf0_grctx_pack_gpc[] = {
718 {} 718 {}
719}; 719};
720 720
721static const struct nvc0_graph_init 721const struct nvc0_graph_init
722nvf0_grctx_init_tex_0[] = { 722nvf0_grctx_init_tex_0[] = {
723 { 0x419a00, 1, 0x04, 0x000000f0 }, 723 { 0x419a00, 1, 0x04, 0x000000f0 },
724 { 0x419a04, 1, 0x04, 0x00000001 }, 724 { 0x419a04, 1, 0x04, 0x00000001 },
@@ -797,7 +797,7 @@ nvf0_grctx_init_cbm_0[] = {
797 {} 797 {}
798}; 798};
799 799
800static const struct nvc0_graph_pack 800const struct nvc0_graph_pack
801nvf0_grctx_pack_ppc[] = { 801nvf0_grctx_pack_ppc[] = {
802 { nve4_grctx_init_pes_0 }, 802 { nve4_grctx_init_pes_0 },
803 { nvf0_grctx_init_cbm_0 }, 803 { nvf0_grctx_init_cbm_0 },
@@ -809,7 +809,7 @@ nvf0_grctx_pack_ppc[] = {
809 * PGRAPH context implementation 809 * PGRAPH context implementation
810 ******************************************************************************/ 810 ******************************************************************************/
811 811
812static void 812void
813nvf0_grctx_generate_mods(struct nvc0_graph_priv *priv, struct nvc0_grctx *info) 813nvf0_grctx_generate_mods(struct nvc0_graph_priv *priv, struct nvc0_grctx *info)
814{ 814{
815 u32 magic[GPC_MAX][4]; 815 u32 magic[GPC_MAX][4];
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/gk110b.c b/drivers/gpu/drm/nouveau/core/engine/graph/gk110b.c
new file mode 100644
index 000000000000..fe71375a5791
--- /dev/null
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/gk110b.c
@@ -0,0 +1,116 @@
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"
26#include "ctxnvc0.h"
27
28/*******************************************************************************
29 * PGRAPH register lists
30 ******************************************************************************/
31
32static const struct nvc0_graph_init
33gk110b_graph_init_l1c_0[] = {
34 { 0x419c98, 1, 0x04, 0x00000000 },
35 { 0x419ca8, 1, 0x04, 0x00000000 },
36 { 0x419cb0, 1, 0x04, 0x09000000 },
37 { 0x419cb4, 1, 0x04, 0x00000000 },
38 { 0x419cb8, 1, 0x04, 0x00b08bea },
39 { 0x419c84, 1, 0x04, 0x00010384 },
40 { 0x419cbc, 1, 0x04, 0x281b3646 },
41 { 0x419cc0, 2, 0x04, 0x00000000 },
42 { 0x419c80, 1, 0x04, 0x00020230 },
43 { 0x419ccc, 2, 0x04, 0x00000000 },
44 {}
45};
46
47static const struct nvc0_graph_init
48gk110b_graph_init_sm_0[] = {
49 { 0x419e00, 1, 0x04, 0x00000080 },
50 { 0x419ea0, 1, 0x04, 0x00000000 },
51 { 0x419ee4, 1, 0x04, 0x00000000 },
52 { 0x419ea4, 1, 0x04, 0x00000100 },
53 { 0x419ea8, 1, 0x04, 0x00000000 },
54 { 0x419eb4, 1, 0x04, 0x00000000 },
55 { 0x419ebc, 2, 0x04, 0x00000000 },
56 { 0x419edc, 1, 0x04, 0x00000000 },
57 { 0x419f00, 1, 0x04, 0x00000000 },
58 { 0x419ed0, 1, 0x04, 0x00002616 },
59 { 0x419f74, 1, 0x04, 0x00015555 },
60 { 0x419f80, 4, 0x04, 0x00000000 },
61 {}
62};
63
64static const struct nvc0_graph_pack
65gk110b_graph_pack_mmio[] = {
66 { nve4_graph_init_main_0 },
67 { nvf0_graph_init_fe_0 },
68 { nvc0_graph_init_pri_0 },
69 { nvc0_graph_init_rstr2d_0 },
70 { nvd9_graph_init_pd_0 },
71 { nvf0_graph_init_ds_0 },
72 { nvc0_graph_init_scc_0 },
73 { nvf0_graph_init_sked_0 },
74 { nvf0_graph_init_cwd_0 },
75 { nvd9_graph_init_prop_0 },
76 { nvc1_graph_init_gpc_unk_0 },
77 { nvc0_graph_init_setup_0 },
78 { nvc0_graph_init_crstr_0 },
79 { nvc1_graph_init_setup_1 },
80 { nvc0_graph_init_zcull_0 },
81 { nvd9_graph_init_gpm_0 },
82 { nvf0_graph_init_gpc_unk_1 },
83 { nvc0_graph_init_gcc_0 },
84 { nve4_graph_init_tpccs_0 },
85 { nvf0_graph_init_tex_0 },
86 { nve4_graph_init_pe_0 },
87 { gk110b_graph_init_l1c_0 },
88 { nvc0_graph_init_mpc_0 },
89 { gk110b_graph_init_sm_0 },
90 { nvd7_graph_init_pes_0 },
91 { nvd7_graph_init_wwdx_0 },
92 { nvd7_graph_init_cbm_0 },
93 { nve4_graph_init_be_0 },
94 { nvc0_graph_init_fe_1 },
95 {}
96};
97
98/*******************************************************************************
99 * PGRAPH engine/subdev functions
100 ******************************************************************************/
101
102struct nouveau_oclass *
103gk110b_graph_oclass = &(struct nvc0_graph_oclass) {
104 .base.handle = NV_ENGINE(GR, 0xf1),
105 .base.ofuncs = &(struct nouveau_ofuncs) {
106 .ctor = nvc0_graph_ctor,
107 .dtor = nvc0_graph_dtor,
108 .init = nve4_graph_init,
109 .fini = nvf0_graph_fini,
110 },
111 .cclass = &gk110b_grctx_oclass,
112 .sclass = nvf0_graph_sclass,
113 .mmio = gk110b_graph_pack_mmio,
114 .fecs.ucode = &nvf0_graph_fecs_ucode,
115 .gpccs.ucode = &nvf0_graph_gpccs_ucode,
116}.base;
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h
index ffc289198dd8..65d6f7be0e35 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.h
@@ -121,9 +121,11 @@ int nvc0_graph_init(struct nouveau_object *);
121int nve4_graph_fini(struct nouveau_object *, bool); 121int nve4_graph_fini(struct nouveau_object *, bool);
122int nve4_graph_init(struct nouveau_object *); 122int nve4_graph_init(struct nouveau_object *);
123 123
124extern struct nouveau_oclass nvc0_graph_sclass[]; 124int nvf0_graph_fini(struct nouveau_object *, bool);
125 125
126extern struct nouveau_oclass nvc0_graph_sclass[];
126extern struct nouveau_oclass nvc8_graph_sclass[]; 127extern struct nouveau_oclass nvc8_graph_sclass[];
128extern struct nouveau_oclass nvf0_graph_sclass[];
127 129
128struct nvc0_graph_init { 130struct nvc0_graph_init {
129 u32 addr; 131 u32 addr;
@@ -149,6 +151,9 @@ struct nvc0_graph_ucode {
149extern struct nvc0_graph_ucode nvc0_graph_fecs_ucode; 151extern struct nvc0_graph_ucode nvc0_graph_fecs_ucode;
150extern struct nvc0_graph_ucode nvc0_graph_gpccs_ucode; 152extern struct nvc0_graph_ucode nvc0_graph_gpccs_ucode;
151 153
154extern struct nvc0_graph_ucode nvf0_graph_fecs_ucode;
155extern struct nvc0_graph_ucode nvf0_graph_gpccs_ucode;
156
152struct nvc0_graph_oclass { 157struct nvc0_graph_oclass {
153 struct nouveau_oclass base; 158 struct nouveau_oclass base;
154 struct nouveau_oclass **cclass; 159 struct nouveau_oclass **cclass;
@@ -223,9 +228,11 @@ extern const struct nvc0_graph_init nve4_graph_init_be_0[];
223extern const struct nvc0_graph_pack nve4_graph_pack_mmio[]; 228extern const struct nvc0_graph_pack nve4_graph_pack_mmio[];
224 229
225extern const struct nvc0_graph_init nvf0_graph_init_fe_0[]; 230extern const struct nvc0_graph_init nvf0_graph_init_fe_0[];
231extern const struct nvc0_graph_init nvf0_graph_init_ds_0[];
226extern const struct nvc0_graph_init nvf0_graph_init_sked_0[]; 232extern const struct nvc0_graph_init nvf0_graph_init_sked_0[];
227extern const struct nvc0_graph_init nvf0_graph_init_cwd_0[]; 233extern const struct nvc0_graph_init nvf0_graph_init_cwd_0[];
228extern const struct nvc0_graph_init nvf0_graph_init_gpc_unk_1[]; 234extern const struct nvc0_graph_init nvf0_graph_init_gpc_unk_1[];
235extern const struct nvc0_graph_init nvf0_graph_init_tex_0[];
229extern const struct nvc0_graph_init nvf0_graph_init_sm_0[]; 236extern const struct nvc0_graph_init nvf0_graph_init_sm_0[];
230 237
231extern const struct nvc0_graph_init nv108_graph_init_gpc_unk_0[]; 238extern const struct nvc0_graph_init nv108_graph_init_gpc_unk_0[];
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvf0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvf0.c
index c96762122b9b..768c51f93910 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nvf0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvf0.c
@@ -29,7 +29,7 @@
29 * Graphics object classes 29 * Graphics object classes
30 ******************************************************************************/ 30 ******************************************************************************/
31 31
32static struct nouveau_oclass 32struct nouveau_oclass
33nvf0_graph_sclass[] = { 33nvf0_graph_sclass[] = {
34 { 0x902d, &nouveau_object_ofuncs }, 34 { 0x902d, &nouveau_object_ofuncs },
35 { 0xa140, &nouveau_object_ofuncs }, 35 { 0xa140, &nouveau_object_ofuncs },
@@ -50,7 +50,7 @@ nvf0_graph_init_fe_0[] = {
50 {} 50 {}
51}; 51};
52 52
53static const struct nvc0_graph_init 53const struct nvc0_graph_init
54nvf0_graph_init_ds_0[] = { 54nvf0_graph_init_ds_0[] = {
55 { 0x405844, 1, 0x04, 0x00ffffff }, 55 { 0x405844, 1, 0x04, 0x00ffffff },
56 { 0x405850, 1, 0x04, 0x00000000 }, 56 { 0x405850, 1, 0x04, 0x00000000 },
@@ -88,7 +88,7 @@ nvf0_graph_init_gpc_unk_1[] = {
88 {} 88 {}
89}; 89};
90 90
91static const struct nvc0_graph_init 91const struct nvc0_graph_init
92nvf0_graph_init_tex_0[] = { 92nvf0_graph_init_tex_0[] = {
93 { 0x419ab0, 1, 0x04, 0x00000000 }, 93 { 0x419ab0, 1, 0x04, 0x00000000 },
94 { 0x419ac8, 1, 0x04, 0x00000000 }, 94 { 0x419ac8, 1, 0x04, 0x00000000 },
@@ -170,7 +170,7 @@ nvf0_graph_pack_mmio[] = {
170 * PGRAPH engine/subdev functions 170 * PGRAPH engine/subdev functions
171 ******************************************************************************/ 171 ******************************************************************************/
172 172
173static int 173int
174nvf0_graph_fini(struct nouveau_object *object, bool suspend) 174nvf0_graph_fini(struct nouveau_object *object, bool suspend)
175{ 175{
176 struct nvc0_graph_priv *priv = (void *)object; 176 struct nvc0_graph_priv *priv = (void *)object;
@@ -209,7 +209,7 @@ nvf0_graph_fini(struct nouveau_object *object, bool suspend)
209 209
210#include "fuc/hubnvf0.fuc.h" 210#include "fuc/hubnvf0.fuc.h"
211 211
212static struct nvc0_graph_ucode 212struct nvc0_graph_ucode
213nvf0_graph_fecs_ucode = { 213nvf0_graph_fecs_ucode = {
214 .code.data = nvf0_grhub_code, 214 .code.data = nvf0_grhub_code,
215 .code.size = sizeof(nvf0_grhub_code), 215 .code.size = sizeof(nvf0_grhub_code),
@@ -219,7 +219,7 @@ nvf0_graph_fecs_ucode = {
219 219
220#include "fuc/gpcnvf0.fuc.h" 220#include "fuc/gpcnvf0.fuc.h"
221 221
222static struct nvc0_graph_ucode 222struct nvc0_graph_ucode
223nvf0_graph_gpccs_ucode = { 223nvf0_graph_gpccs_ucode = {
224 .code.data = nvf0_grgpc_code, 224 .code.data = nvf0_grgpc_code,
225 .code.size = sizeof(nvf0_grgpc_code), 225 .code.size = sizeof(nvf0_grgpc_code),
diff --git a/drivers/gpu/drm/nouveau/core/include/engine/graph.h b/drivers/gpu/drm/nouveau/core/include/engine/graph.h
index 8c1d4772da0c..d5055570d01b 100644
--- a/drivers/gpu/drm/nouveau/core/include/engine/graph.h
+++ b/drivers/gpu/drm/nouveau/core/include/engine/graph.h
@@ -70,6 +70,7 @@ extern struct nouveau_oclass *nvd9_graph_oclass;
70extern struct nouveau_oclass *nve4_graph_oclass; 70extern struct nouveau_oclass *nve4_graph_oclass;
71extern struct nouveau_oclass *gk20a_graph_oclass; 71extern struct nouveau_oclass *gk20a_graph_oclass;
72extern struct nouveau_oclass *nvf0_graph_oclass; 72extern struct nouveau_oclass *nvf0_graph_oclass;
73extern struct nouveau_oclass *gk110b_graph_oclass;
73extern struct nouveau_oclass *nv108_graph_oclass; 74extern struct nouveau_oclass *nv108_graph_oclass;
74extern struct nouveau_oclass *gm107_graph_oclass; 75extern struct nouveau_oclass *gm107_graph_oclass;
75 76