summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gp10b
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-04-14 16:11:18 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-19 16:24:30 -0400
commit6df49a63ca5f9d77a6d7d6c7dbaaa0fba1b707ca (patch)
treeb50c57b2759fb4a20390880ea5b5d874d324d046 /drivers/gpu/nvgpu/gp10b
parent15e9b433f3a33f4d68582d8eeabfcfd32db8c340 (diff)
gpu: nvgpu: Move is_fmodel to struct gk20a
Copy is_fmodel to struct gk20a at probe time, and access it from gk20a instead of platform_gk20a. JIRA NVGPU-16 Change-Id: Ib8d793ea2b02b62da3bfdbb6372d9927658b7ec6 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1463540 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/gp10b')
-rw-r--r--drivers/gpu/nvgpu/gp10b/hal_gp10b.c5
-rw-r--r--drivers/gpu/nvgpu/gp10b/ltc_gp10b.c3
2 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
index 6990b4ef..0332897e 100644
--- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c
@@ -189,13 +189,12 @@ int gp10b_init_hal(struct gk20a *g)
189{ 189{
190 struct gpu_ops *gops = &g->ops; 190 struct gpu_ops *gops = &g->ops;
191 struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics; 191 struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics;
192 struct gk20a_platform *platform = dev_get_drvdata(g->dev);
193 u32 val; 192 u32 val;
194 193
195 gops->clock_gating = gp10b_ops.clock_gating; 194 gops->clock_gating = gp10b_ops.clock_gating;
196 gops->pmupstate = false; 195 gops->pmupstate = false;
197#ifdef CONFIG_TEGRA_ACR 196#ifdef CONFIG_TEGRA_ACR
198 if (platform->is_fmodel) { 197 if (g->is_fmodel) {
199 gops->privsecurity = 0; 198 gops->privsecurity = 0;
200 gops->securegpccs = 0; 199 gops->securegpccs = 0;
201 } else if (gk20a_gpu_is_virtual(g->dev)) { 200 } else if (gk20a_gpu_is_virtual(g->dev)) {
@@ -213,7 +212,7 @@ int gp10b_init_hal(struct gk20a *g)
213 } 212 }
214 } 213 }
215#else 214#else
216 if (platform->is_fmodel) { 215 if (g->is_fmodel) {
217 gk20a_dbg_info("running simulator with PRIV security disabled"); 216 gk20a_dbg_info("running simulator with PRIV security disabled");
218 gops->privsecurity = 0; 217 gops->privsecurity = 0;
219 gops->securegpccs = 0; 218 gops->securegpccs = 0;
diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
index 42bfbf29..9ca5f46e 100644
--- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
+++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c
@@ -71,7 +71,6 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
71 u32 compbit_backing_size; 71 u32 compbit_backing_size;
72 72
73 int err; 73 int err;
74 struct gk20a_platform *platform = dev_get_drvdata(g->dev);
75 74
76 gk20a_dbg_fn(""); 75 gk20a_dbg_fn("");
77 76
@@ -102,7 +101,7 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
102 gk20a_dbg_info("gobs_per_comptagline_per_slice: %d", 101 gk20a_dbg_info("gobs_per_comptagline_per_slice: %d",
103 gobs_per_comptagline_per_slice); 102 gobs_per_comptagline_per_slice);
104 103
105 if (platform->is_fmodel) 104 if (g->is_fmodel)
106 err = gk20a_ltc_alloc_phys_cbc(g, compbit_backing_size); 105 err = gk20a_ltc_alloc_phys_cbc(g, compbit_backing_size);
107 else 106 else
108 err = gk20a_ltc_alloc_virt_cbc(g, compbit_backing_size); 107 err = gk20a_ltc_alloc_virt_cbc(g, compbit_backing_size);