diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gp106/hal_gp106.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp106/hal_gp106.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp106/hal_gp106.c b/drivers/gpu/nvgpu/gp106/hal_gp106.c index e9ee77fc..d63398c7 100644 --- a/drivers/gpu/nvgpu/gp106/hal_gp106.c +++ b/drivers/gpu/nvgpu/gp106/hal_gp106.c | |||
@@ -79,6 +79,7 @@ | |||
79 | #include "gp106/fb_gp106.h" | 79 | #include "gp106/fb_gp106.h" |
80 | #include "gp106/gp106_gating_reglist.h" | 80 | #include "gp106/gp106_gating_reglist.h" |
81 | #include "gp106/flcn_gp106.h" | 81 | #include "gp106/flcn_gp106.h" |
82 | #include "gp106/fuse_gp106.h" | ||
82 | 83 | ||
83 | #include "hal_gp106.h" | 84 | #include "hal_gp106.h" |
84 | 85 | ||
@@ -704,6 +705,9 @@ static const struct gpu_ops gp106_ops = { | |||
704 | .priv_ring = { | 705 | .priv_ring = { |
705 | .isr = gp10b_priv_ring_isr, | 706 | .isr = gp10b_priv_ring_isr, |
706 | }, | 707 | }, |
708 | .fuse = { | ||
709 | .check_priv_security = gp106_fuse_check_priv_security, | ||
710 | }, | ||
707 | .get_litter_value = gp106_get_litter_value, | 711 | .get_litter_value = gp106_get_litter_value, |
708 | .chip_init_gpu_characteristics = gp106_init_gpu_characteristics, | 712 | .chip_init_gpu_characteristics = gp106_init_gpu_characteristics, |
709 | }; | 713 | }; |
@@ -753,6 +757,7 @@ int gp106_init_hal(struct gk20a *g) | |||
753 | gops->xve = gp106_ops.xve; | 757 | gops->xve = gp106_ops.xve; |
754 | gops->falcon = gp106_ops.falcon; | 758 | gops->falcon = gp106_ops.falcon; |
755 | gops->priv_ring = gp106_ops.priv_ring; | 759 | gops->priv_ring = gp106_ops.priv_ring; |
760 | gops->fuse = gp106_ops.fuse; | ||
756 | 761 | ||
757 | /* Lone functions */ | 762 | /* Lone functions */ |
758 | gops->get_litter_value = gp106_ops.get_litter_value; | 763 | gops->get_litter_value = gp106_ops.get_litter_value; |
@@ -760,11 +765,13 @@ int gp106_init_hal(struct gk20a *g) | |||
760 | gp106_ops.chip_init_gpu_characteristics; | 765 | gp106_ops.chip_init_gpu_characteristics; |
761 | 766 | ||
762 | __nvgpu_set_enabled(g, NVGPU_GR_USE_DMA_FOR_FW_BOOTSTRAP, true); | 767 | __nvgpu_set_enabled(g, NVGPU_GR_USE_DMA_FOR_FW_BOOTSTRAP, true); |
763 | __nvgpu_set_enabled(g, NVGPU_SEC_PRIVSECURITY, true); | ||
764 | __nvgpu_set_enabled(g, NVGPU_SEC_SECUREGPCCS, true); | ||
765 | __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, true); | 768 | __nvgpu_set_enabled(g, NVGPU_PMU_PSTATE, true); |
766 | __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false); | 769 | __nvgpu_set_enabled(g, NVGPU_PMU_FECS_BOOTSTRAP_DONE, false); |
767 | 770 | ||
771 | /* Read fuses to check if gpu needs to boot in secure/non-secure mode */ | ||
772 | if (gops->fuse.check_priv_security(g)) | ||
773 | return -EINVAL; /* Do not boot gpu */ | ||
774 | |||
768 | g->pmu_lsf_pmu_wpr_init_done = 0; | 775 | g->pmu_lsf_pmu_wpr_init_done = 0; |
769 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; | 776 | g->bootstrap_owner = LSF_FALCON_ID_SEC2; |
770 | 777 | ||