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/gk20a/fence_gk20a.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index a5aeae08..c886101c 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c @@ -19,6 +19,7 @@ #include #include +#include #include "gk20a.h" #include "channel_gk20a.h" @@ -80,10 +81,10 @@ static inline bool gk20a_fence_is_valid(struct gk20a_fence *f) return valid; } -int gk20a_fence_wait(struct gk20a_fence *f, int timeout) +int gk20a_fence_wait(struct gk20a *g, struct gk20a_fence *f, int timeout) { if (f && gk20a_fence_is_valid(f)) { - if (!tegra_platform_is_silicon()) + if (!nvgpu_platform_is_silicon(g)) timeout = (u32)MAX_SCHEDULE_TIMEOUT; return f->ops->wait(f, timeout); } -- cgit v1.2.2