aboutsummaryrefslogtreecommitdiffstats
path: root/include/os/linux/vgpu/vgpu_linux.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/os/linux/vgpu/vgpu_linux.h')
-rw-r--r--include/os/linux/vgpu/vgpu_linux.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/include/os/linux/vgpu/vgpu_linux.h b/include/os/linux/vgpu/vgpu_linux.h
new file mode 100644
index 0000000..ff7d3a6
--- /dev/null
+++ b/include/os/linux/vgpu/vgpu_linux.h
@@ -0,0 +1,68 @@
1/*
2 * Virtualized GPU Linux Interfaces
3 *
4 * Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13 * more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18
19#ifndef __VGPU_LINUX_H__
20#define __VGPU_LINUX_H__
21
22struct device;
23struct platform_device;
24
25#ifdef CONFIG_TEGRA_GR_VIRTUALIZATION
26
27#include <nvgpu/vgpu/vgpu.h>
28
29int vgpu_pm_prepare_poweroff(struct device *dev);
30int vgpu_pm_finalize_poweron(struct device *dev);
31int vgpu_probe(struct platform_device *dev);
32int vgpu_remove(struct platform_device *dev);
33
34void vgpu_create_sysfs(struct device *dev);
35void vgpu_remove_sysfs(struct device *dev);
36
37int vgpu_tegra_suspend(struct device *dev);
38int vgpu_tegra_resume(struct device *dev);
39#else
40/* define placeholders for functions used outside of vgpu */
41
42static inline int vgpu_pm_prepare_poweroff(struct device *dev)
43{
44 return -ENOSYS;
45}
46static inline int vgpu_pm_finalize_poweron(struct device *dev)
47{
48 return -ENOSYS;
49}
50static inline int vgpu_probe(struct platform_device *dev)
51{
52 return -ENOSYS;
53}
54static inline int vgpu_remove(struct platform_device *dev)
55{
56 return -ENOSYS;
57}
58static inline int vgpu_tegra_suspend(struct device *dev)
59{
60 return -ENOSYS;
61}
62static inline int vgpu_tegra_resume(struct device *dev)
63{
64 return -ENOSYS;
65}
66#endif
67
68#endif