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/common/linux/timers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/common/linux/timers.c') diff --git a/drivers/gpu/nvgpu/common/linux/timers.c b/drivers/gpu/nvgpu/common/linux/timers.c index 07eb357a..9fe84b50 100644 --- a/drivers/gpu/nvgpu/common/linux/timers.c +++ b/drivers/gpu/nvgpu/common/linux/timers.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2016-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, @@ -18,6 +18,7 @@ #include #include +#include #include "gk20a/gk20a.h" @@ -31,7 +32,7 @@ static int nvgpu_timeout_is_pre_silicon(struct nvgpu_timeout *timeout) if (timeout->flags & NVGPU_TIMER_NO_PRE_SI) return 0; - return !tegra_platform_is_silicon(); + return !nvgpu_platform_is_silicon(timeout->g); } /** -- cgit v1.2.2