diff options
-rw-r--r-- | drivers/gpu/nvgpu/Makefile | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm206/hal_gm206.c | 23 |
2 files changed, 21 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index b0bb4176..2857cd5a 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile | |||
@@ -78,7 +78,9 @@ nvgpu-y := \ | |||
78 | gm206/bios_gm206.o \ | 78 | gm206/bios_gm206.o \ |
79 | gm206/fifo_gm206.o \ | 79 | gm206/fifo_gm206.o \ |
80 | gm206/hal_gm206.o \ | 80 | gm206/hal_gm206.o \ |
81 | gm206/gr_gm206.o | 81 | gm206/gr_gm206.o \ |
82 | gm206/acr_gm206.o \ | ||
83 | gm206/pmu_gm206.o | ||
82 | 84 | ||
83 | nvgpu-$(CONFIG_TEGRA_GK20A) += gk20a/platform_gk20a_tegra.o | 85 | nvgpu-$(CONFIG_TEGRA_GK20A) += gk20a/platform_gk20a_tegra.o |
84 | nvgpu-$(CONFIG_SYNC) += gk20a/sync_gk20a.o | 86 | nvgpu-$(CONFIG_SYNC) += gk20a/sync_gk20a.o |
diff --git a/drivers/gpu/nvgpu/gm206/hal_gm206.c b/drivers/gpu/nvgpu/gm206/hal_gm206.c index aa6b676f..048a109f 100644 --- a/drivers/gpu/nvgpu/gm206/hal_gm206.c +++ b/drivers/gpu/nvgpu/gm206/hal_gm206.c | |||
@@ -25,6 +25,8 @@ | |||
25 | #include "gm20b/fb_gm20b.h" | 25 | #include "gm20b/fb_gm20b.h" |
26 | #include "gm20b/pmu_gm20b.h" | 26 | #include "gm20b/pmu_gm20b.h" |
27 | #include "gm20b/gr_gm20b.h" | 27 | #include "gm20b/gr_gm20b.h" |
28 | #include "gm206/pmu_gm206.h" | ||
29 | #include "gm206/acr_gm206.h" | ||
28 | #include "gm20b/gr_ctx_gm20b.h" | 30 | #include "gm20b/gr_ctx_gm20b.h" |
29 | #include "gm20b/gm20b_gating_reglist.h" | 31 | #include "gm20b/gm20b_gating_reglist.h" |
30 | #include "gm20b/regops_gm20b.h" | 32 | #include "gm20b/regops_gm20b.h" |
@@ -167,11 +169,12 @@ int gm206_init_hal(struct gk20a *g) | |||
167 | { | 169 | { |
168 | struct gpu_ops *gops = &g->ops; | 170 | struct gpu_ops *gops = &g->ops; |
169 | struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; | 171 | struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; |
172 | u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; | ||
170 | 173 | ||
171 | *gops = gm206_ops; | 174 | *gops = gm206_ops; |
172 | 175 | ||
173 | gops->privsecurity = 0; | 176 | gops->privsecurity = 1; |
174 | gops->securegpccs = 0; | 177 | gops->securegpccs = 1; |
175 | 178 | ||
176 | gm20b_init_mc(gops); | 179 | gm20b_init_mc(gops); |
177 | gm20b_init_ltc(gops); | 180 | gm20b_init_ltc(gops); |
@@ -183,17 +186,27 @@ int gm206_init_hal(struct gk20a *g) | |||
183 | gm20b_init_ce2(gops); | 186 | gm20b_init_ce2(gops); |
184 | gm20b_init_gr_ctx(gops); | 187 | gm20b_init_gr_ctx(gops); |
185 | gm20b_init_mm(gops); | 188 | gm20b_init_mm(gops); |
186 | gm20b_init_pmu_ops(gops); | 189 | gm206_init_pmu_ops(gops); |
187 | gm20b_init_clk_ops(gops); | 190 | gm20b_init_clk_ops(gops); |
188 | gm20b_init_regops(gops); | 191 | gm20b_init_regops(gops); |
189 | gm20b_init_debug_ops(gops); | 192 | gm20b_init_debug_ops(gops); |
190 | gm20b_init_cde_ops(gops); | 193 | gm20b_init_cde_ops(gops); |
191 | gm20b_init_therm_ops(gops); | 194 | gm20b_init_therm_ops(gops); |
192 | gm206_init_bios(gops); | 195 | gm206_init_bios(gops); |
193 | gops->name = "gm206"; | 196 | switch(ver){ |
197 | case GK20A_GPUID_GM206: | ||
198 | gops->name = "gm206"; | ||
199 | break; | ||
200 | case GK20A_GPUID_GM204: | ||
201 | gops->name = "gm204"; | ||
202 | break; | ||
203 | default: | ||
204 | gk20a_err(g->dev, "no support for %x", ver); | ||
205 | BUG(); | ||
206 | } | ||
194 | gops->chip_init_gpu_characteristics = gk20a_init_gpu_characteristics; | 207 | gops->chip_init_gpu_characteristics = gk20a_init_gpu_characteristics; |
195 | gops->get_litter_value = gm206_get_litter_value; | 208 | gops->get_litter_value = gm206_get_litter_value; |
196 | gops->gr_ctx.use_dma_for_fw_bootstrap = false; | 209 | gops->gr_ctx.use_dma_for_fw_bootstrap = true; |
197 | 210 | ||
198 | c->twod_class = FERMI_TWOD_A; | 211 | c->twod_class = FERMI_TWOD_A; |
199 | c->threed_class = MAXWELL_B; | 212 | c->threed_class = MAXWELL_B; |