From ca2c4ce83a846bbab953e91af37c762efaa975e6 Mon Sep 17 00:00:00 2001 From: Mahantesh Kumbar Date: Wed, 8 Jun 2016 19:57:15 +0530 Subject: gpu: nvgpu: Enable GP10x GPMU secure boot Build support & enable GPMU secure boot for GP10x JIRA DNVGPU-34 Change-Id: Id1316677ed44790aa150e0ada8ff39daf0ef1d0c Signed-off-by: Mahantesh Kumbar Reviewed-on: http://git-master/r/1161174 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/Makefile | 4 +++- drivers/gpu/nvgpu/gp106/hal_gp106.c | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 4 deletions(-) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index 7e4c259b..1579e6eb 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile @@ -23,7 +23,9 @@ nvgpu-y += \ $(nvgpu-t18x)/gp106/mm_gp106.o \ $(nvgpu-t18x)/gp106/pmu_gp106.o \ $(nvgpu-t18x)/gp106/gr_gp106.o \ - $(nvgpu-t18x)/gp106/gr_ctx_gp106.o + $(nvgpu-t18x)/gp106/gr_ctx_gp106.o \ + $(nvgpu-t18x)/gp106/acr_gp106.o \ + $(nvgpu-t18x)/gp106/sec2_gp106.o nvgpu-$(CONFIG_TEGRA_GK20A) += $(nvgpu-t18x)/gp10b/platform_gp10b_tegra.o diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index 7ef72d72..1b22547d 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c @@ -180,13 +180,14 @@ int gp106_init_hal(struct gk20a *g) { struct gpu_ops *gops = &g->ops; struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; + u32 ver = g->gpu_characteristics.arch + g->gpu_characteristics.impl; gk20a_dbg_fn(""); *gops = gp106_ops; - gops->privsecurity = 0; - gops->securegpccs = 0; + gops->privsecurity = 1; + gops->securegpccs = 1; gp10b_init_mc(gops); gp106_init_gr(gops); @@ -202,9 +203,20 @@ int gp106_init_hal(struct gk20a *g) gp10b_init_cde_ops(gops); gp10b_init_therm_ops(gops); gm206_init_bios(gops); - gops->name = "gp106"; + switch(ver){ + case NVGPU_GPUID_GP106: + gops->name = "gp106"; + break; + case NVGPU_GPUID_GP104: + gops->name = "gp104"; + break; + default: + gk20a_err(g->dev, "no support for %x", ver); + BUG(); + } gops->get_litter_value = gp106_get_litter_value; gops->chip_init_gpu_characteristics = gk20a_init_gpu_characteristics; + gops->gr_ctx.use_dma_for_fw_bootstrap = true; c->twod_class = FERMI_TWOD_A; c->threed_class = PASCAL_B; -- cgit v1.2.2