From 19fdb429c2b04d13faecad8b2e5466e9f3c7b8c7 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 29 Mar 2017 15:00:24 -0700 Subject: gpu: nvgpu: Wrappers for checking platform type Add nvgpu_* wrappers for determining if we're running in simulation or silicon, and if we're running in hypervisor. The new wrappers require struct gk20a pointer, and gk20a_fence_wait() did not have access to one. Add struct gk20a pointer as the first parameter. JIRA NVGPU-16 Change-Id: I73b2b8f091ca29fb1827054abd2adaf583710331 Signed-off-by: Terje Bergstrom Reviewed-on: http://git-master/r/1331565 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gp10b/therm_gp10b.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gp10b/therm_gp10b.c') diff --git a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c index 4b346313..3656cef3 100644 --- a/drivers/gpu/nvgpu/gp10b/therm_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/therm_gp10b.c @@ -1,9 +1,7 @@ /* - * drivers/gpu/nvgpu/gm20b/therm_gk20a.c - * * GP10B Therm * - * Copyright (c) 2015-2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2015-2017, 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, @@ -17,6 +15,8 @@ #include "gk20a/gk20a.h" +#include + #include static int gp10b_init_therm_setup_hw(struct gk20a *g) @@ -92,7 +92,7 @@ static int gp10b_elcg_init_idle_filters(struct gk20a *g) active_engine_id = f->active_engines_list[engine_id]; gate_ctrl = gk20a_readl(g, therm_gate_ctrl_r(active_engine_id)); - if (tegra_platform_is_linsim()) { + if (nvgpu_platform_is_simulation(g)) { gate_ctrl = set_field(gate_ctrl, therm_gate_ctrl_eng_delay_after_m(), therm_gate_ctrl_eng_delay_after_f(4)); -- cgit v1.2.2