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
This commit is contained in:
Terje Bergstrom
2017-04-14 13:11:18 -07:00
committed by mobile promotions
parent 15e9b433f3
commit 6df49a63ca
17 changed files with 34 additions and 56 deletions

View File

@@ -189,13 +189,12 @@ int gp10b_init_hal(struct gk20a *g)
{
struct gpu_ops *gops = &g->ops;
struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics;
struct gk20a_platform *platform = dev_get_drvdata(g->dev);
u32 val;
gops->clock_gating = gp10b_ops.clock_gating;
gops->pmupstate = false;
#ifdef CONFIG_TEGRA_ACR
if (platform->is_fmodel) {
if (g->is_fmodel) {
gops->privsecurity = 0;
gops->securegpccs = 0;
} else if (gk20a_gpu_is_virtual(g->dev)) {
@@ -213,7 +212,7 @@ int gp10b_init_hal(struct gk20a *g)
}
}
#else
if (platform->is_fmodel) {
if (g->is_fmodel) {
gk20a_dbg_info("running simulator with PRIV security disabled");
gops->privsecurity = 0;
gops->securegpccs = 0;