summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/soc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/soc.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/soc.c42
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/soc.c b/drivers/gpu/nvgpu/common/linux/soc.c
new file mode 100644
index 00000000..6a2bc7c0
--- /dev/null
+++ b/drivers/gpu/nvgpu/common/linux/soc.c
@@ -0,0 +1,42 @@
1/*
2 * Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
12 */
13
14#include <soc/tegra/chip-id.h>
15#include <soc/tegra/tegra_bpmp.h>
16
17#include <nvgpu/soc.h>
18
19bool nvgpu_platform_is_silicon(struct gk20a *g)
20{
21 return tegra_platform_is_silicon();
22}
23
24bool nvgpu_platform_is_simulation(struct gk20a *g)
25{
26 return tegra_platform_is_vdk();
27}
28
29bool nvgpu_platform_is_fpga(struct gk20a *g)
30{
31 return tegra_platform_is_fpga();
32}
33
34bool nvgpu_is_hypervisor_mode(struct gk20a *g)
35{
36 return is_tegra_hypervisor_mode();
37}
38
39bool nvgpu_is_bpmp_running(struct gk20a *g)
40{
41 return tegra_bpmp_running();
42}