diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2015-04-13 22:06:44 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2015-04-14 03:00:58 -0400 |
commit | 426b20e42eaefecdc703f9eff9f874f45e839dca (patch) | |
tree | f35fa6956c6b2e3e426ca938357483dbdbd474bf /drivers/gpu | |
parent | 985826bccdcc381674a8b83c5d293b54f9a84551 (diff) |
drm/nouveau/gr/gm206: initial init+ctx code
Uncertain whether the GPC pack change is due to a newer driver version,
or a legitimate difference from GM204. My GM204 has broken vram, so
can't currently try a newer binary driver on it to confirm.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | 2 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | 18 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm204.c | 20 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c | 83 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | 4 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gm204.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvkm/engine/gr/gm206.c | 40 |
9 files changed, 162 insertions, 16 deletions
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h b/drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h index 3148f1a77ee9..7cbe20280760 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/engine/gr.h | |||
@@ -73,6 +73,7 @@ extern struct nvkm_oclass *gk110b_gr_oclass; | |||
73 | extern struct nvkm_oclass *gk208_gr_oclass; | 73 | extern struct nvkm_oclass *gk208_gr_oclass; |
74 | extern struct nvkm_oclass *gm107_gr_oclass; | 74 | extern struct nvkm_oclass *gm107_gr_oclass; |
75 | extern struct nvkm_oclass *gm204_gr_oclass; | 75 | extern struct nvkm_oclass *gm204_gr_oclass; |
76 | extern struct nvkm_oclass *gm206_gr_oclass; | ||
76 | 77 | ||
77 | #include <core/enum.h> | 78 | #include <core/enum.h> |
78 | 79 | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c index 68be72a91e77..70abf1ec7c98 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/gm100.c | |||
@@ -170,9 +170,7 @@ gm100_identify(struct nvkm_device *device) | |||
170 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = gf110_dmaeng_oclass; | 170 | device->oclass[NVDEV_ENGINE_DMAOBJ ] = gf110_dmaeng_oclass; |
171 | device->oclass[NVDEV_ENGINE_FIFO ] = gm204_fifo_oclass; | 171 | device->oclass[NVDEV_ENGINE_FIFO ] = gm204_fifo_oclass; |
172 | device->oclass[NVDEV_ENGINE_SW ] = gf100_sw_oclass; | 172 | device->oclass[NVDEV_ENGINE_SW ] = gf100_sw_oclass; |
173 | #if 0 | 173 | device->oclass[NVDEV_ENGINE_GR ] = gm206_gr_oclass; |
174 | device->oclass[NVDEV_ENGINE_GR ] = gm107_gr_oclass; | ||
175 | #endif | ||
176 | device->oclass[NVDEV_ENGINE_DISP ] = gm204_disp_oclass; | 174 | device->oclass[NVDEV_ENGINE_DISP ] = gm204_disp_oclass; |
177 | device->oclass[NVDEV_ENGINE_CE0 ] = &gm204_ce0_oclass; | 175 | device->oclass[NVDEV_ENGINE_CE0 ] = &gm204_ce0_oclass; |
178 | device->oclass[NVDEV_ENGINE_CE1 ] = &gm204_ce1_oclass; | 176 | device->oclass[NVDEV_ENGINE_CE1 ] = &gm204_ce1_oclass; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild b/drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild index 1191d324712b..2e1b92f71d9e 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/Kbuild | |||
@@ -13,6 +13,7 @@ nvkm-y += nvkm/engine/gr/ctxgk110b.o | |||
13 | nvkm-y += nvkm/engine/gr/ctxgk208.o | 13 | nvkm-y += nvkm/engine/gr/ctxgk208.o |
14 | nvkm-y += nvkm/engine/gr/ctxgm107.o | 14 | nvkm-y += nvkm/engine/gr/ctxgm107.o |
15 | nvkm-y += nvkm/engine/gr/ctxgm204.o | 15 | nvkm-y += nvkm/engine/gr/ctxgm204.o |
16 | nvkm-y += nvkm/engine/gr/ctxgm206.o | ||
16 | nvkm-y += nvkm/engine/gr/nv04.o | 17 | nvkm-y += nvkm/engine/gr/nv04.o |
17 | nvkm-y += nvkm/engine/gr/nv10.o | 18 | nvkm-y += nvkm/engine/gr/nv10.o |
18 | nvkm-y += nvkm/engine/gr/nv20.o | 19 | nvkm-y += nvkm/engine/gr/nv20.o |
@@ -36,3 +37,4 @@ nvkm-y += nvkm/engine/gr/gk110b.o | |||
36 | nvkm-y += nvkm/engine/gr/gk208.o | 37 | nvkm-y += nvkm/engine/gr/gk208.o |
37 | nvkm-y += nvkm/engine/gr/gm107.o | 38 | nvkm-y += nvkm/engine/gr/gm107.o |
38 | nvkm-y += nvkm/engine/gr/gm204.o | 39 | nvkm-y += nvkm/engine/gr/gm204.o |
40 | nvkm-y += nvkm/engine/gr/gm206.o | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h index 6c7b134ce468..3676a3342bc5 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgf100.h | |||
@@ -101,6 +101,9 @@ void gm107_grctx_generate_pagepool(struct gf100_grctx *); | |||
101 | void gm107_grctx_generate_attrib(struct gf100_grctx *); | 101 | void gm107_grctx_generate_attrib(struct gf100_grctx *); |
102 | 102 | ||
103 | extern struct nvkm_oclass *gm204_grctx_oclass; | 103 | extern struct nvkm_oclass *gm204_grctx_oclass; |
104 | void gm204_grctx_generate_main(struct gf100_gr_priv *, struct gf100_grctx *); | ||
105 | |||
106 | extern struct nvkm_oclass *gm206_grctx_oclass; | ||
104 | 107 | ||
105 | /* context init value lists */ | 108 | /* context init value lists */ |
106 | 109 | ||
@@ -207,4 +210,19 @@ extern const struct gf100_gr_init gk208_grctx_init_crstr_0[]; | |||
207 | 210 | ||
208 | extern const struct gf100_gr_init gm107_grctx_init_gpc_unk_0[]; | 211 | extern const struct gf100_gr_init gm107_grctx_init_gpc_unk_0[]; |
209 | extern const struct gf100_gr_init gm107_grctx_init_wwdx_0[]; | 212 | extern const struct gf100_gr_init gm107_grctx_init_wwdx_0[]; |
213 | |||
214 | extern const struct gf100_gr_pack gm204_grctx_pack_icmd[]; | ||
215 | |||
216 | extern const struct gf100_gr_pack gm204_grctx_pack_mthd[]; | ||
217 | |||
218 | extern const struct gf100_gr_pack gm204_grctx_pack_hub[]; | ||
219 | |||
220 | extern const struct gf100_gr_init gm204_grctx_init_prop_0[]; | ||
221 | extern const struct gf100_gr_init gm204_grctx_init_setup_0[]; | ||
222 | extern const struct gf100_gr_init gm204_grctx_init_gpm_0[]; | ||
223 | extern const struct gf100_gr_init gm204_grctx_init_gpc_unk_2[]; | ||
224 | |||
225 | extern const struct gf100_gr_pack gm204_grctx_pack_tpc[]; | ||
226 | |||
227 | extern const struct gf100_gr_pack gm204_grctx_pack_ppc[]; | ||
210 | #endif | 228 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm204.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm204.c index 9e4be5ee5ba2..ea8e66151aa8 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm204.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm204.c | |||
@@ -294,7 +294,7 @@ gm204_grctx_init_icmd_0[] = { | |||
294 | {} | 294 | {} |
295 | }; | 295 | }; |
296 | 296 | ||
297 | static const struct gf100_gr_pack | 297 | const struct gf100_gr_pack |
298 | gm204_grctx_pack_icmd[] = { | 298 | gm204_grctx_pack_icmd[] = { |
299 | { gm204_grctx_init_icmd_0 }, | 299 | { gm204_grctx_init_icmd_0 }, |
300 | {} | 300 | {} |
@@ -642,7 +642,7 @@ gm204_grctx_init_b197_0[] = { | |||
642 | {} | 642 | {} |
643 | }; | 643 | }; |
644 | 644 | ||
645 | static const struct gf100_gr_pack | 645 | const struct gf100_gr_pack |
646 | gm204_grctx_pack_mthd[] = { | 646 | gm204_grctx_pack_mthd[] = { |
647 | { gm204_grctx_init_b197_0, 0xb197 }, | 647 | { gm204_grctx_init_b197_0, 0xb197 }, |
648 | { gf100_grctx_init_902d_0, 0x902d }, | 648 | { gf100_grctx_init_902d_0, 0x902d }, |
@@ -723,7 +723,7 @@ gm204_grctx_init_be_0[] = { | |||
723 | {} | 723 | {} |
724 | }; | 724 | }; |
725 | 725 | ||
726 | static const struct gf100_gr_pack | 726 | const struct gf100_gr_pack |
727 | gm204_grctx_pack_hub[] = { | 727 | gm204_grctx_pack_hub[] = { |
728 | { gf100_grctx_init_main_0 }, | 728 | { gf100_grctx_init_main_0 }, |
729 | { gm204_grctx_init_fe_0 }, | 729 | { gm204_grctx_init_fe_0 }, |
@@ -738,7 +738,7 @@ gm204_grctx_pack_hub[] = { | |||
738 | {} | 738 | {} |
739 | }; | 739 | }; |
740 | 740 | ||
741 | static const struct gf100_gr_init | 741 | const struct gf100_gr_init |
742 | gm204_grctx_init_prop_0[] = { | 742 | gm204_grctx_init_prop_0[] = { |
743 | { 0x418400, 1, 0x04, 0x38e01e00 }, | 743 | { 0x418400, 1, 0x04, 0x38e01e00 }, |
744 | { 0x418404, 1, 0x04, 0x70001fff }, | 744 | { 0x418404, 1, 0x04, 0x70001fff }, |
@@ -764,7 +764,7 @@ gm204_grctx_init_gpc_unk_1[] = { | |||
764 | {} | 764 | {} |
765 | }; | 765 | }; |
766 | 766 | ||
767 | static const struct gf100_gr_init | 767 | const struct gf100_gr_init |
768 | gm204_grctx_init_setup_0[] = { | 768 | gm204_grctx_init_setup_0[] = { |
769 | { 0x418800, 1, 0x04, 0x7006863a }, | 769 | { 0x418800, 1, 0x04, 0x7006863a }, |
770 | { 0x418808, 1, 0x04, 0x00000000 }, | 770 | { 0x418808, 1, 0x04, 0x00000000 }, |
@@ -778,7 +778,7 @@ gm204_grctx_init_setup_0[] = { | |||
778 | {} | 778 | {} |
779 | }; | 779 | }; |
780 | 780 | ||
781 | static const struct gf100_gr_init | 781 | const struct gf100_gr_init |
782 | gm204_grctx_init_gpm_0[] = { | 782 | gm204_grctx_init_gpm_0[] = { |
783 | { 0x418c10, 8, 0x04, 0x00000000 }, | 783 | { 0x418c10, 8, 0x04, 0x00000000 }, |
784 | { 0x418c40, 1, 0x04, 0xffffffff }, | 784 | { 0x418c40, 1, 0x04, 0xffffffff }, |
@@ -787,7 +787,7 @@ gm204_grctx_init_gpm_0[] = { | |||
787 | {} | 787 | {} |
788 | }; | 788 | }; |
789 | 789 | ||
790 | static const struct gf100_gr_init | 790 | const struct gf100_gr_init |
791 | gm204_grctx_init_gpc_unk_2[] = { | 791 | gm204_grctx_init_gpc_unk_2[] = { |
792 | { 0x418e00, 1, 0x04, 0x90040000 }, | 792 | { 0x418e00, 1, 0x04, 0x90040000 }, |
793 | { 0x418e24, 1, 0x04, 0x00000000 }, | 793 | { 0x418e24, 1, 0x04, 0x00000000 }, |
@@ -880,7 +880,7 @@ gm204_grctx_init_sm_0[] = { | |||
880 | {} | 880 | {} |
881 | }; | 881 | }; |
882 | 882 | ||
883 | static const struct gf100_gr_pack | 883 | const struct gf100_gr_pack |
884 | gm204_grctx_pack_tpc[] = { | 884 | gm204_grctx_pack_tpc[] = { |
885 | { gm204_grctx_init_pe_0 }, | 885 | { gm204_grctx_init_pe_0 }, |
886 | { gm204_grctx_init_tex_0 }, | 886 | { gm204_grctx_init_tex_0 }, |
@@ -906,7 +906,7 @@ gm204_grctx_init_cbm_0[] = { | |||
906 | {} | 906 | {} |
907 | }; | 907 | }; |
908 | 908 | ||
909 | static const struct gf100_gr_pack | 909 | const struct gf100_gr_pack |
910 | gm204_grctx_pack_ppc[] = { | 910 | gm204_grctx_pack_ppc[] = { |
911 | { gm204_grctx_init_pes_0 }, | 911 | { gm204_grctx_init_pes_0 }, |
912 | { gm204_grctx_init_cbm_0 }, | 912 | { gm204_grctx_init_cbm_0 }, |
@@ -974,7 +974,7 @@ gm204_grctx_generate_405b60(struct gf100_gr_priv *priv) | |||
974 | nv_wr32(priv, 0x405ba0 + (i * 4), gpcs[i]); | 974 | nv_wr32(priv, 0x405ba0 + (i * 4), gpcs[i]); |
975 | } | 975 | } |
976 | 976 | ||
977 | static void | 977 | void |
978 | gm204_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info) | 978 | gm204_grctx_generate_main(struct gf100_gr_priv *priv, struct gf100_grctx *info) |
979 | { | 979 | { |
980 | struct gf100_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; | 980 | struct gf100_grctx_oclass *oclass = (void *)nv_engine(priv)->cclass; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c new file mode 100644 index 000000000000..91ec41617943 --- /dev/null +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm206.c | |||
@@ -0,0 +1,83 @@ | |||
1 | /* | ||
2 | * Copyright 2015 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 | #include "ctxgf100.h" | ||
25 | |||
26 | static const struct gf100_gr_init | ||
27 | gm206_grctx_init_gpc_unk_1[] = { | ||
28 | { 0x418600, 1, 0x04, 0x0000007f }, | ||
29 | { 0x418684, 1, 0x04, 0x0000001f }, | ||
30 | { 0x418700, 1, 0x04, 0x00000002 }, | ||
31 | { 0x418704, 1, 0x04, 0x00000080 }, | ||
32 | { 0x418708, 1, 0x04, 0x40000000 }, | ||
33 | { 0x41870c, 2, 0x04, 0x00000000 }, | ||
34 | { 0x418728, 1, 0x04, 0x00300020 }, | ||
35 | {} | ||
36 | }; | ||
37 | |||
38 | static const struct gf100_gr_pack | ||
39 | gm206_grctx_pack_gpc[] = { | ||
40 | { gm107_grctx_init_gpc_unk_0 }, | ||
41 | { gm204_grctx_init_prop_0 }, | ||
42 | { gm206_grctx_init_gpc_unk_1 }, | ||
43 | { gm204_grctx_init_setup_0 }, | ||
44 | { gf100_grctx_init_zcull_0 }, | ||
45 | { gk208_grctx_init_crstr_0 }, | ||
46 | { gm204_grctx_init_gpm_0 }, | ||
47 | { gm204_grctx_init_gpc_unk_2 }, | ||
48 | { gf100_grctx_init_gcc_0 }, | ||
49 | {} | ||
50 | }; | ||
51 | |||
52 | struct nvkm_oclass * | ||
53 | gm206_grctx_oclass = &(struct gf100_grctx_oclass) { | ||
54 | .base.handle = NV_ENGCTX(GR, 0x26), | ||
55 | .base.ofuncs = &(struct nvkm_ofuncs) { | ||
56 | .ctor = gf100_gr_context_ctor, | ||
57 | .dtor = gf100_gr_context_dtor, | ||
58 | .init = _nvkm_gr_context_init, | ||
59 | .fini = _nvkm_gr_context_fini, | ||
60 | .rd32 = _nvkm_gr_context_rd32, | ||
61 | .wr32 = _nvkm_gr_context_wr32, | ||
62 | }, | ||
63 | .main = gm204_grctx_generate_main, | ||
64 | .unkn = gk104_grctx_generate_unkn, | ||
65 | .hub = gm204_grctx_pack_hub, | ||
66 | .gpc = gm206_grctx_pack_gpc, | ||
67 | .zcull = gf100_grctx_pack_zcull, | ||
68 | .tpc = gm204_grctx_pack_tpc, | ||
69 | .ppc = gm204_grctx_pack_ppc, | ||
70 | .icmd = gm204_grctx_pack_icmd, | ||
71 | .mthd = gm204_grctx_pack_mthd, | ||
72 | .bundle = gm107_grctx_generate_bundle, | ||
73 | .bundle_size = 0x3000, | ||
74 | .bundle_min_gpm_fifo_depth = 0x180, | ||
75 | .bundle_token_limit = 0x780, | ||
76 | .pagepool = gm107_grctx_generate_pagepool, | ||
77 | .pagepool_size = 0x20000, | ||
78 | .attrib = gm107_grctx_generate_attrib, | ||
79 | .attrib_nr_max = 0x600, | ||
80 | .attrib_nr = 0x400, | ||
81 | .alpha_nr_max = 0x1800, | ||
82 | .alpha_nr = 0x1000, | ||
83 | }.base; | ||
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h index f6cf0ab9f37e..8af1a89eda84 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.h | |||
@@ -129,6 +129,8 @@ int gk104_gr_ctor(struct nvkm_object *, struct nvkm_object *, | |||
129 | struct nvkm_object **); | 129 | struct nvkm_object **); |
130 | int gk104_gr_init(struct nvkm_object *); | 130 | int gk104_gr_init(struct nvkm_object *); |
131 | 131 | ||
132 | int gm204_gr_init(struct nvkm_object *); | ||
133 | |||
132 | extern struct nvkm_ofuncs gf100_fermi_ofuncs; | 134 | extern struct nvkm_ofuncs gf100_fermi_ofuncs; |
133 | 135 | ||
134 | extern struct nvkm_oclass gf100_gr_sclass[]; | 136 | extern struct nvkm_oclass gf100_gr_sclass[]; |
@@ -136,6 +138,7 @@ extern struct nvkm_omthds gf100_gr_9097_omthds[]; | |||
136 | extern struct nvkm_omthds gf100_gr_90c0_omthds[]; | 138 | extern struct nvkm_omthds gf100_gr_90c0_omthds[]; |
137 | extern struct nvkm_oclass gf110_gr_sclass[]; | 139 | extern struct nvkm_oclass gf110_gr_sclass[]; |
138 | extern struct nvkm_oclass gk110_gr_sclass[]; | 140 | extern struct nvkm_oclass gk110_gr_sclass[]; |
141 | extern struct nvkm_oclass gm204_gr_sclass[]; | ||
139 | 142 | ||
140 | struct gf100_gr_init { | 143 | struct gf100_gr_init { |
141 | u32 addr; | 144 | u32 addr; |
@@ -259,4 +262,5 @@ extern const struct gf100_gr_init gm107_gr_init_wwdx_0[]; | |||
259 | extern const struct gf100_gr_init gm107_gr_init_cbm_0[]; | 262 | extern const struct gf100_gr_init gm107_gr_init_cbm_0[]; |
260 | void gm107_gr_init_bios(struct gf100_gr_priv *); | 263 | void gm107_gr_init_bios(struct gf100_gr_priv *); |
261 | 264 | ||
265 | extern const struct gf100_gr_pack gm204_gr_pack_mmio[]; | ||
262 | #endif | 266 | #endif |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm204.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm204.c index cb7d0b415958..2f5eadd12a9b 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm204.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm204.c | |||
@@ -30,7 +30,7 @@ | |||
30 | * Graphics object classes | 30 | * Graphics object classes |
31 | ******************************************************************************/ | 31 | ******************************************************************************/ |
32 | 32 | ||
33 | static struct nvkm_oclass | 33 | struct nvkm_oclass |
34 | gm204_gr_sclass[] = { | 34 | gm204_gr_sclass[] = { |
35 | { FERMI_TWOD_A, &nvkm_object_ofuncs }, | 35 | { FERMI_TWOD_A, &nvkm_object_ofuncs }, |
36 | { KEPLER_INLINE_TO_MEMORY_B, &nvkm_object_ofuncs }, | 36 | { KEPLER_INLINE_TO_MEMORY_B, &nvkm_object_ofuncs }, |
@@ -196,7 +196,7 @@ gm204_gr_init_be_0[] = { | |||
196 | {} | 196 | {} |
197 | }; | 197 | }; |
198 | 198 | ||
199 | static const struct gf100_gr_pack | 199 | const struct gf100_gr_pack |
200 | gm204_gr_pack_mmio[] = { | 200 | gm204_gr_pack_mmio[] = { |
201 | { gm204_gr_init_main_0 }, | 201 | { gm204_gr_init_main_0 }, |
202 | { gm204_gr_init_fe_0 }, | 202 | { gm204_gr_init_fe_0 }, |
@@ -248,7 +248,7 @@ gm204_gr_init_ctxctl(struct gf100_gr_priv *priv) | |||
248 | return 0; | 248 | return 0; |
249 | } | 249 | } |
250 | 250 | ||
251 | static int | 251 | int |
252 | gm204_gr_init(struct nvkm_object *object) | 252 | gm204_gr_init(struct nvkm_object *object) |
253 | { | 253 | { |
254 | struct gf100_gr_oclass *oclass = (void *)object->oclass; | 254 | struct gf100_gr_oclass *oclass = (void *)object->oclass; |
diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm206.c b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm206.c new file mode 100644 index 000000000000..04b9733d146a --- /dev/null +++ b/drivers/gpu/drm/nouveau/nvkm/engine/gr/gm206.c | |||
@@ -0,0 +1,40 @@ | |||
1 | /* | ||
2 | * Copyright 2015 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 | #include "gf100.h" | ||
25 | #include "ctxgf100.h" | ||
26 | |||
27 | struct nvkm_oclass * | ||
28 | gm206_gr_oclass = &(struct gf100_gr_oclass) { | ||
29 | .base.handle = NV_ENGINE(GR, 0x26), | ||
30 | .base.ofuncs = &(struct nvkm_ofuncs) { | ||
31 | .ctor = gf100_gr_ctor, | ||
32 | .dtor = gf100_gr_dtor, | ||
33 | .init = gm204_gr_init, | ||
34 | .fini = _nvkm_gr_fini, | ||
35 | }, | ||
36 | .cclass = &gm206_grctx_oclass, | ||
37 | .sclass = gm204_gr_sclass, | ||
38 | .mmio = gm204_gr_pack_mmio, | ||
39 | .ppc_nr = 2, | ||
40 | }.base; | ||