diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-14 16:11:18 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-19 16:24:30 -0400 |
commit | 6df49a63ca5f9d77a6d7d6c7dbaaa0fba1b707ca (patch) | |
tree | b50c57b2759fb4a20390880ea5b5d874d324d046 /drivers/gpu/nvgpu/gp10b/hal_gp10b.c | |
parent | 15e9b433f3a33f4d68582d8eeabfcfd32db8c340 (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/hal_gp10b.c')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 5 |
1 files changed, 2 insertions, 3 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; |