From 436109f46d49a24b69bab7c85b112f192ab002c0 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Thu, 7 Jul 2016 15:01:00 -0700 Subject: gpu: nvgpu: gp10b: add is_fmodel check Check for is_fmodel instead of check for simualtion platforms. Bug 1735760 Change-Id: I14e349088e9414a73353a94613fa031e63bfa31f Signed-off-by: Seema Khowala Reviewed-on: http://git-master/r/1177200 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu Tested-by: Seshendra Gadagottu Reviewed-by: Tejal Kudav Reviewed-by: Ayoosh Bansal Reviewed-by: Adeel Raza --- drivers/gpu/nvgpu/gp10b/hal_gp10b.c | 7 ++++--- drivers/gpu/nvgpu/gp10b/ltc_gp10b.c | 5 +++-- drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c index d82a03eb..87ba5bf6 100644 --- a/drivers/gpu/nvgpu/gp10b/hal_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/hal_gp10b.c @@ -187,11 +187,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); *gops = gp10b_ops; #ifdef CONFIG_TEGRA_ACR - if (tegra_platform_is_linsim()) { + if (platform->is_fmodel) { gops->privsecurity = 0; gops->securegpccs = 0; } else { @@ -206,8 +207,8 @@ int gp10b_init_hal(struct gk20a *g) } } #else - if (tegra_platform_is_linsim()) { - gk20a_dbg_info("running ASIM with PRIV security disabled"); + if (platform->is_fmodel) { + gk20a_dbg_info("running simulator with PRIV security disabled"); gops->privsecurity = 0; gops->securegpccs = 0; } else { diff --git a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c index 0ccabaf8..3e64d435 100644 --- a/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/ltc_gp10b.c @@ -1,7 +1,7 @@ /* * GP10B L2 * - * Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU General Public License, @@ -70,6 +70,7 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) u32 compbit_backing_size; int err; + struct gk20a_platform *platform = dev_get_drvdata(g->dev); gk20a_dbg_fn(""); @@ -100,7 +101,7 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr) gk20a_dbg_info("gobs_per_comptagline_per_slice: %d", gobs_per_comptagline_per_slice); - if (tegra_platform_is_linsim()) + if (platform->is_fmodel) err = gk20a_ltc_alloc_phys_cbc(g, compbit_backing_size); else err = gk20a_ltc_alloc_virt_cbc(g, compbit_backing_size); diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c index 1e4796d4..210d9865 100644 --- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c @@ -64,7 +64,7 @@ static int gp10b_tegra_get_clocks(struct device *dev) struct gk20a_platform *platform = dev_get_drvdata(dev); int i; - if (tegra_platform_is_linsim()) + if (platform->is_fmodel) return 0; platform->num_clks = 0; -- cgit v1.2.2