summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gm20b
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gm20b')
-rw-r--r--drivers/gpu/nvgpu/gm20b/gr_gm20b.c3
-rw-r--r--drivers/gpu/nvgpu/gm20b/hal_gm20b.c5
-rw-r--r--drivers/gpu/nvgpu/gm20b/ltc_gm20b.c3
3 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
index e7b6fa85..82c587f9 100644
--- a/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/gr_gm20b.c
@@ -19,6 +19,7 @@
19 19
20#include <nvgpu/kmem.h> 20#include <nvgpu/kmem.h>
21#include <nvgpu/log.h> 21#include <nvgpu/log.h>
22#include <nvgpu/enabled.h>
22 23
23#include "gk20a/gk20a.h" 24#include "gk20a/gk20a.h"
24#include "gk20a/gr_gk20a.h" 25#include "gk20a/gr_gk20a.h"
@@ -745,7 +746,7 @@ static int gr_gm20b_load_ctxsw_ucode(struct gk20a *g)
745 746
746 gk20a_dbg_fn(""); 747 gk20a_dbg_fn("");
747 748
748 if (g->is_fmodel) { 749 if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL)) {
749 gk20a_writel(g, gr_fecs_ctxsw_mailbox_r(7), 750 gk20a_writel(g, gr_fecs_ctxsw_mailbox_r(7),
750 gr_fecs_ctxsw_mailbox_value_f(0xc0de7777)); 751 gr_fecs_ctxsw_mailbox_value_f(0xc0de7777));
751 gk20a_writel(g, gr_gpccs_ctxsw_mailbox_r(7), 752 gk20a_writel(g, gr_gpccs_ctxsw_mailbox_r(7),
diff --git a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
index 33198c23..f5328f03 100644
--- a/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/hal_gm20b.c
@@ -39,6 +39,7 @@
39#include "hal_gm20b.h" 39#include "hal_gm20b.h"
40 40
41#include <nvgpu/bug.h> 41#include <nvgpu/bug.h>
42#include <nvgpu/enabled.h>
42 43
43#include <nvgpu/hw/gm20b/hw_proj_gm20b.h> 44#include <nvgpu/hw/gm20b/hw_proj_gm20b.h>
44#include <nvgpu/hw/gm20b/hw_fuse_gm20b.h> 45#include <nvgpu/hw/gm20b/hw_fuse_gm20b.h>
@@ -192,7 +193,7 @@ int gm20b_init_hal(struct gk20a *g)
192 gops->securegpccs = false; 193 gops->securegpccs = false;
193 gops->pmupstate = false; 194 gops->pmupstate = false;
194#ifdef CONFIG_TEGRA_ACR 195#ifdef CONFIG_TEGRA_ACR
195 if (g->is_fmodel) { 196 if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL)) {
196 gops->privsecurity = 1; 197 gops->privsecurity = 1;
197 } else { 198 } else {
198 val = gk20a_readl(g, fuse_opt_priv_sec_en_r()); 199 val = gk20a_readl(g, fuse_opt_priv_sec_en_r());
@@ -204,7 +205,7 @@ int gm20b_init_hal(struct gk20a *g)
204 } 205 }
205 } 206 }
206#else 207#else
207 if (g->is_fmodel) { 208 if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL)) {
208 gk20a_dbg_info("running ASIM with PRIV security disabled"); 209 gk20a_dbg_info("running ASIM with PRIV security disabled");
209 gops->privsecurity = 0; 210 gops->privsecurity = 0;
210 } else { 211 } else {
diff --git a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
index 84c3dfcd..791cc45b 100644
--- a/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
+++ b/drivers/gpu/nvgpu/gm20b/ltc_gm20b.c
@@ -18,6 +18,7 @@
18#include "gk20a/gk20a.h" 18#include "gk20a/gk20a.h"
19 19
20#include <nvgpu/timers.h> 20#include <nvgpu/timers.h>
21#include <nvgpu/enabled.h>
21#include <nvgpu/bug.h> 22#include <nvgpu/bug.h>
22 23
23#include <nvgpu/hw/gm20b/hw_mc_gm20b.h> 24#include <nvgpu/hw/gm20b/hw_mc_gm20b.h>
@@ -82,7 +83,7 @@ static int gm20b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
82 gk20a_dbg_info("max comptag lines : %d", 83 gk20a_dbg_info("max comptag lines : %d",
83 max_comptag_lines); 84 max_comptag_lines);
84 85
85 if (g->is_fmodel) 86 if (nvgpu_is_enabled(g, NVGPU_IS_FMODEL))
86 err = gk20a_ltc_alloc_phys_cbc(g, compbit_backing_size); 87 err = gk20a_ltc_alloc_phys_cbc(g, compbit_backing_size);
87 else 88 else
88 err = gk20a_ltc_alloc_virt_cbc(g, compbit_backing_size); 89 err = gk20a_ltc_alloc_virt_cbc(g, compbit_backing_size);