diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-03-29 18:00:24 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-11 13:56:06 -0400 |
commit | 19fdb429c2b04d13faecad8b2e5466e9f3c7b8c7 (patch) | |
tree | e92f6d93ae2593286546f983b9a1fff8638aa9a6 /drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |
parent | 1a4647272f4fe50137c79583b698c1ef6f5def12 (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1331565
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 @@ | |||
19 | 19 | ||
20 | #include <nvgpu/semaphore.h> | 20 | #include <nvgpu/semaphore.h> |
21 | #include <nvgpu/kmem.h> | 21 | #include <nvgpu/kmem.h> |
22 | #include <nvgpu/soc.h> | ||
22 | 23 | ||
23 | #include "gk20a.h" | 24 | #include "gk20a.h" |
24 | #include "channel_gk20a.h" | 25 | #include "channel_gk20a.h" |
@@ -80,10 +81,10 @@ static inline bool gk20a_fence_is_valid(struct gk20a_fence *f) | |||
80 | return valid; | 81 | return valid; |
81 | } | 82 | } |
82 | 83 | ||
83 | int gk20a_fence_wait(struct gk20a_fence *f, int timeout) | 84 | int gk20a_fence_wait(struct gk20a *g, struct gk20a_fence *f, int timeout) |
84 | { | 85 | { |
85 | if (f && gk20a_fence_is_valid(f)) { | 86 | if (f && gk20a_fence_is_valid(f)) { |
86 | if (!tegra_platform_is_silicon()) | 87 | if (!nvgpu_platform_is_silicon(g)) |
87 | timeout = (u32)MAX_SCHEDULE_TIMEOUT; | 88 | timeout = (u32)MAX_SCHEDULE_TIMEOUT; |
88 | return f->ops->wait(f, timeout); | 89 | return f->ops->wait(f, timeout); |
89 | } | 90 | } |