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/bus_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/bus_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/bus_gk20a.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/bus_gk20a.c b/drivers/gpu/nvgpu/gk20a/bus_gk20a.c index 3119e373..e81a5b2a 100644 --- a/drivers/gpu/nvgpu/gk20a/bus_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/bus_gk20a.c | |||
@@ -14,10 +14,9 @@ | |||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | */ | 15 | */ |
16 | 16 | ||
17 | #include <soc/tegra/chip-id.h> | ||
18 | |||
19 | #include <nvgpu/page_allocator.h> | 17 | #include <nvgpu/page_allocator.h> |
20 | #include <nvgpu/log.h> | 18 | #include <nvgpu/log.h> |
19 | #include <nvgpu/soc.h> | ||
21 | 20 | ||
22 | #include "gk20a.h" | 21 | #include "gk20a.h" |
23 | 22 | ||
@@ -31,7 +30,7 @@ void gk20a_bus_init_hw(struct gk20a *g) | |||
31 | struct gk20a_platform *platform = gk20a_get_platform(g->dev); | 30 | struct gk20a_platform *platform = gk20a_get_platform(g->dev); |
32 | 31 | ||
33 | /* enable pri timeout only on silicon */ | 32 | /* enable pri timeout only on silicon */ |
34 | if (tegra_platform_is_silicon()) { | 33 | if (nvgpu_platform_is_silicon(g)) { |
35 | gk20a_writel(g, | 34 | gk20a_writel(g, |
36 | timer_pri_timeout_r(), | 35 | timer_pri_timeout_r(), |
37 | timer_pri_timeout_period_f( | 36 | timer_pri_timeout_period_f( |
@@ -46,7 +45,7 @@ void gk20a_bus_init_hw(struct gk20a *g) | |||
46 | timer_pri_timeout_en_en_disabled_f()); | 45 | timer_pri_timeout_en_en_disabled_f()); |
47 | } | 46 | } |
48 | 47 | ||
49 | if (!tegra_platform_is_silicon()) | 48 | if (!nvgpu_platform_is_silicon(g)) |
50 | gk20a_writel(g, bus_intr_en_0_r(), 0x0); | 49 | gk20a_writel(g, bus_intr_en_0_r(), 0x0); |
51 | else | 50 | else |
52 | gk20a_writel(g, bus_intr_en_0_r(), | 51 | gk20a_writel(g, bus_intr_en_0_r(), |