summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm206
diff options
context:
space:
mode:
authorMahantesh Kumbar <mkumbar@nvidia.com>2016-05-31 07:21:08 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-06-05 18:35:44 -0400
commitb77cca1d62790176442df8b9bb7f82b05a0c190f (patch)
treee37681bf8eabd3e1af33e7e8ec253756ea6aa1e4 /drivers/gpu/nvgpu/gm206
parentb6b7da610853b0efc0890027aaf0eb29eb7c7545 (diff)
gpu: nvgpu: enable gm204/gm206 GPMU secure boot
enable gm204/gm206 GPMU secure boot & build. JIRA DNVGPU-11 Change-Id: I3502d227d0baad9e3a27f46d1d6b0d2a83503b6c Signed-off-by: Mahantesh Kumbar <mkumbar@nvidia.com> Reviewed-on: http://git-master/r/1156331 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gm206')
-rw-r--r--drivers/gpu/nvgpu/gm206/hal_gm206.c23
1 files changed, 18 insertions, 5 deletions
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;